mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-12-01 11:39:01 +08:00
13 lines
346 B
GLSL
13 lines
346 B
GLSL
var a="致远电子"
|
|
assert(ulen(a) == 4);
|
|
assert(ulen(a+"abc") == 7);
|
|
assert(usubstr(a) == '致远电子');
|
|
assert(usubstr(a,0) == '致远电子');
|
|
assert(usubstr(a,0,1) == '致');
|
|
assert(usubstr(a,0,-1) == '致远电');
|
|
assert(usubstr(a,-2,-1) == '电');
|
|
assert(usubstr(a, -3) == '远电子');
|
|
assert(usubstr(a, -3, ulen(a)) == '远电子');
|
|
|
|
|