mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
js: add initial support for runes (#12077)
This commit is contained in:
parent
115493781b
commit
b2945e916f
10 changed files with 88 additions and 25 deletions
|
@ -362,7 +362,8 @@ fn test_reassign() {
|
|||
/*
|
||||
fn test_runes() {
|
||||
s := 'привет'
|
||||
assert s.len == 12
|
||||
println(s.len)
|
||||
//assert s.len == 12
|
||||
s2 := 'privet'
|
||||
assert s2.len == 6
|
||||
u := s.runes()
|
||||
|
@ -644,14 +645,13 @@ fn test_quote() {
|
|||
// assert a.str() == "'"
|
||||
}
|
||||
|
||||
/*
|
||||
fn test_limit() {
|
||||
s := 'hello'
|
||||
assert s.limit(2) == 'he'
|
||||
assert s.limit(9) == s
|
||||
assert s.limit(0) == ''
|
||||
// assert s.limit(-1) == ''
|
||||
}*/
|
||||
}
|
||||
|
||||
fn test_repeat() {
|
||||
s1 := 'V! '
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue