173 Commits

Author SHA1 Message Date
kbkpbot
2da65219e2
builtin: add string.expand_tabs() (#24781) 2025-06-24 02:50:55 +03:00
Jose Mendoza
a5f400ee77
parser, ast, fmt: convert "hello".str => c"hello" (fix #24635) (#24652) 2025-06-08 11:44:38 +03:00
Delyan Angelov
bb2d605653
tests: cleanup obsolete TODOs about cgen errors 2025-05-31 07:53:18 +03:00
kbkpbot
57b815f96d
builtin: add string.is_identifier() (#24350) 2025-04-28 13:55:56 +03:00
gechandesu
4f85b35bb9
builtin: add string.split_by_space() (#23651) 2025-02-04 11:12:42 +02:00
yuyi
b30be51872
builtin: fix runes.to_upper() (fix #22742) (#22755) 2024-11-06 16:54:12 +02:00
yuyi
ea1992380c
builtin: add string.is_pure_ascii() (#22748) 2024-11-03 18:52:23 +02:00
Delyan Angelov
c5e8ad19df
builtin: implement a s.hex() method, allowing shortening s.bytes().hex() chains, and reducing the intermediate allocations; add tests for it (#22540) 2024-10-16 14:18:10 +03:00
Jose Mendoza
75658415f1
builtin: add string.wrap method + tests (#22441) 2024-10-08 07:14:32 +03:00
yuyi
ca5f47a966
builtin: cleanup string trim()/trim_left()/trim_right() (#22225) 2024-09-15 20:05:42 +03:00
yuyi
6eae77b61e
builtin: fix string.trim() (fix #13021) (#22205) 2024-09-13 07:27:40 +03:00
yuyi
19f080ffb8
all: change single blank comment to blank line (#22016) 2024-08-09 14:55:58 +03:00
yuyi
bf04adcc81
builtin: fix 'aaaa'.split('aa') (fix #21936) (#21951) 2024-07-28 13:25:14 +03:00
Swastik Baranwal
69bc4be512
builtin: add s.trim_space_left/0 and s.trim_space_right/0 methods (#21903) 2024-07-21 22:38:59 +03:00
Turiiya
895bd71fa0
builtin: improve snake to camel case conversion (#21755) 2024-06-29 11:10:10 +03:00
Turiiya
6ecfc6f63a
builtin: fix assert '_ISspace'.camel_to_snake() == '_i_sspace' (#21736) 2024-06-27 08:23:39 +03:00
Turiiya
c5c49d3685
builtin: fix assert 'JVM_PUBLIC_ACC'.camel_to_snake() == 'jvm_public_acc' (#21722) 2024-06-24 23:01:52 +03:00
Turiiya
895bb87a32
builtin: improve performance of string.camel_to_snake (#21691) 2024-06-18 09:16:10 +03:00
kbkpbot
df1e4f1246
builtin: add string.camel_to_snake/0 and string.snake_to_camel/0 methods (#21679) 2024-06-15 21:02:44 +03:00
kbkpbot
02f65627bc
builtin: fix string.find_between(), when not found end string return '' (#21670) 2024-06-12 14:25:19 +03:00
Turiiya
a2ce55d922
builtin: update last_index_u8, deprecate index_u8_last string methods, make consistent with last_index (#21604) 2024-06-04 13:21:47 +03:00
Turiiya
5329a0a671
builtin: fix empty string lower / upper assert (#21358) 2024-04-26 21:03:44 +03:00
Swastik Baranwal
c7af2c21d1
builtin.string: fix is_upper and is_lower with numbers (#21357) 2024-04-26 16:20:21 +03:00
Alexander Medvednikov
24ac0c1fb5 builtin: fix tests 2024-03-29 07:59:11 +03:00
Turiiya
f77bb32044
all: fix typos (#21089) 2024-03-25 12:18:27 +02:00
kbkpbot
7fd1b169f3
builtin: add a string.u8_array() method (#20736) 2024-02-06 17:53:02 +02:00
Vinicius Silva
3569635eff
builtin: add empty string verification for the new string .is_oct() etc methods, suggested on PR #20540 (#20564) 2024-01-17 11:00:07 +02:00
Vinicius Silva
afd74ad6e6
builtin: add is_hex(), is_int(), is_bin(), and is_oct() methods to the string type (#20540) 2024-01-16 23:58:28 +02:00
Anton
763f94388b
all: update copyright year (#20334) 2024-01-01 23:29:54 +02:00
Delyan Angelov
0df6fcce8c
scanner: fix backslashes followed directly by newline in string literals (fix #20291) (#20296) 2023-12-29 07:21:49 +02:00
Delyan Angelov
4b3109237d
builtin: deprecate string.last_index/1 for string.index_last/1, and string.last_index_u8/1 for string.index_u8_last/1 (#20095) 2023-12-05 13:56:59 +02:00
katekyy
b622dca915
builtin: fix split_nth() and rsplit_nth() on an empty delimeter (#19005) 2023-07-30 00:12:51 +03:00
yuyi
467a1b4435
fmt: remove redundant parenthesis in the complex infix expr (#17873) 2023-04-04 13:47:48 +03:00
Alexander Medvednikov
6756d28595 all: 2023 copyright 2023-03-28 22:55:57 +02:00
Delyan Angelov
3793bf1c99
builtin: optimise the common case of s.contains("x") add s.contains_byte(x) (#17702) 2023-03-19 01:10:13 +03:00
ChAoS_UnItY
f02b423f80
builtin: string test refactor, string functions inlining (#17598) 2023-03-11 20:44:45 +02:00
ChAoS_UnItY
9fa49da9d5
builtin: add rsplit functions (#17577) 2023-03-11 00:07:02 +01:00
ChAoS_UnItY
0b7a1cd7ce
v: forbid local variable names, shadowing imported module names (#17197) 2023-02-03 09:09:41 +02:00
Makhnev Petr
17d65db828
builtin: add string.trim_indent()` method (#17099) 2023-01-24 21:41:25 +02:00
Roy Ivy III
5cd074a49e
builtin: improve multi-platform portability for string.split_into_lines() (#17078) 2023-01-24 10:02:25 +02:00
yuyi
017ace6ea7
vfmt: change all '$expr' to '${expr}' (#16428) 2022-11-15 16:53:13 +03:00
shove
26d643fc5d
all: rollback to old interpolation (step 3) (#16380) 2022-11-10 15:05:34 +03:00
Alexander Medvednikov
18c7da9a5e all: new string interpolation "hello {name}!" 2022-10-27 11:01:01 +03:00
l-m
a139bed785
builtin: add string.trim_indexes method, that can be used in string.trim, but also separately from it (#16144) 2022-10-22 12:56:05 +03:00
yuyi
612faac0f0
all: change index expr returning optional to result too (#16097) 2022-10-19 21:04:16 +03:00
l-m
10f3c9f127
builtin: add string.replace_char and string.normalize_tabs (#15239) 2022-07-27 22:04:39 +03:00
l-m
ed8c63cc0b
builtin: add a contains_only method on string (#14830) 2022-06-23 01:41:42 +03:00
WoodyAtHome
02c8a6057c
builtin.string: new fn (s string) is_ascii() bool (#14418) 2022-05-17 08:01:03 +03:00
Daniel Däschle
d679146a80
fmt: remove space in front of ? and ! (#14366) 2022-05-13 06:56:21 +03:00
StunxFS
995485c649
builtin: add string.len_utf8() method (#14208) 2022-04-29 10:23:57 +03:00