phase29aq(p1): add stdlib scan/parse/split subsets
This commit is contained in:
3
apps/tests/phase29aq_string_index_of_min.hako
Normal file
3
apps/tests/phase29aq_string_index_of_min.hako
Normal file
@ -0,0 +1,3 @@
|
||||
using "apps/lib/json_native/utils/string.hako" as StringUtils
|
||||
|
||||
print(StringUtils.index_of("hello", "l"))
|
||||
3
apps/tests/phase29aq_string_last_index_of_min.hako
Normal file
3
apps/tests/phase29aq_string_last_index_of_min.hako
Normal file
@ -0,0 +1,3 @@
|
||||
using "apps/lib/json_native/utils/string.hako" as StringUtils
|
||||
|
||||
print(StringUtils.last_index_of("hello", "l"))
|
||||
3
apps/tests/phase29aq_string_parse_integer_min.hako
Normal file
3
apps/tests/phase29aq_string_parse_integer_min.hako
Normal file
@ -0,0 +1,3 @@
|
||||
using "apps/lib/json_native/utils/string.hako" as StringUtils
|
||||
|
||||
print(StringUtils.parse_integer("12345"))
|
||||
9
apps/tests/phase29aq_string_split_min.hako
Normal file
9
apps/tests/phase29aq_string_split_min.hako
Normal file
@ -0,0 +1,9 @@
|
||||
using "apps/lib/json_native/utils/string.hako" as StringUtils
|
||||
|
||||
static box Main {
|
||||
main(args) {
|
||||
local result = StringUtils.split("a,b,c", ",")
|
||||
print(result.length())
|
||||
return 0
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user