Commit Graph

124 Commits (d5e70552ebf2cef22aa6bef5babbecd16e8ec6b0)

Author SHA1 Message Date
StunxFS 995485c649
builtin: add `string.len_utf8()` method (#14208) 2022-04-29 10:23:57 +03:00
Alexander Medvednikov fbb9e65c0f all: ~500 more byte=>u8 2022-04-15 18:25:45 +03:00
Alexander Medvednikov d4a0d6f73c all: byte => u8 2022-04-15 14:58:56 +03:00
Delyan Angelov 89b99ad4c3
scanner: remove the restriction for \x00 in strings (#13493) 2022-02-16 23:41:05 +02:00
trueFireblade 727c9fb4a1
all: add string range OrExpr (#13189) 2022-01-17 13:03:10 +03:00
Delyan Angelov d3489d4246
builtin: s.trim_prefix/1 -> s.trim_string_left/1, s.trim_suffix/1 -> s.trim_string_right/1 2022-01-05 12:49:22 +02:00
Delyan Angelov 0f01236e52
strconv: fix `assert .f64() == 0` 2022-01-04 17:51:48 +02:00
Alexander Medvednikov 59ed4be49a all: update copyright year 2022-01-04 12:21:12 +03:00
penguindark 81a1490e31
builtin: add string.split_any/1 (#12720) 2021-12-04 20:13:40 +02:00
yuyi c28041cecc
all: cleanup/rename all `comp_` names to be `comptime_` (#12467) 2021-11-15 15:47:29 +02:00
Delyan Angelov 80242c8041
builtin,ast: apply small performance improvements, suggested by `hotspot` 2021-11-07 13:30:44 +02:00
Ken a17b943e87
builtin: add method `byte()` for string (#11998) 2021-09-28 10:08:10 +03:00
Lathanao 78c26e69cf
builtin: fix the string.index_any method (#11310) 2021-09-06 15:06:37 +03:00
zakuro 490dec222f
fmt: keep char literal, `'` (#11060) 2021-08-06 06:21:28 +03:00
Daniel Däschle 0f9537ece5
all: remove ustring (#10630) 2021-07-03 20:14:09 +03:00
Daniel Däschle 6838030ab5
builtin: add string.runes() (#10611) 2021-06-30 09:17:38 +03:00
Delyan Angelov bd539b6427
vfmt: fix string interpolation formatting with multiple ',",\' and \" . 2021-04-20 20:26:06 +03:00
Lukas Neubert ada763e0f4
fmt: remove parenthesis around single ident (#9696) 2021-04-12 16:01:03 +03:00
Alexander Medvednikov 57e6138a61 all: remove byteptr and charptr; replace them with &byte and &char 2021-04-04 17:43:32 +03:00
yuyi 320cd00203
string: fix replace_each() (#9415) 2021-03-22 09:46:45 +01:00
JalonSolov 6f550ebbdc
string: fix fields method when no whitespace (#9326) 2021-03-16 19:45:27 +02:00
Alexander Medvednikov 93df560cf9 builtin: deprecate string.split_by_whitespace in favor of fields() 2021-03-16 08:29:14 +03:00
yuyi 2b9ffbda42
cgen: fix array_sort by different order of a/b (#9106) 2021-03-04 11:19:02 +01:00
Delyan Angelov 4fcd8d8a98
scanner: fix `' "$var", "$another"'` where `r"`, was treated as start of a raw string 2021-01-28 15:38:42 +02:00
Alexander Medvednikov 43d56cb883 string: update the test 2021-01-22 10:33:06 +01:00
Lukas Neubert ac2c3847af
all: update copyright to 2019-2021 (#8029) 2021-01-18 13:20:06 +01:00
Nick Treleaven cbefe6c32f
parser: warn about old use of `typeof` (#7923) 2021-01-07 20:32:02 +01:00
Delyan Angelov 84fc9cec4b
builtin: add string.split_by_whitespace() 2020-12-29 08:46:46 +02:00
Andréas Livet a2ec52b8c4
builtin: rewrite string.split_nth and fix some bugs (#7189) 2020-12-08 10:51:47 +02:00
Daniel Däschle 52b627feb3
checker: check filter, map and sort left type (#6952) 2020-11-26 11:28:54 +01:00
Swastik Baranwal 00464ad988
builtin: add charptr.vstring() and charptr.vstring_with_len() (#6830) 2020-11-14 19:43:42 +02:00
Swastik Baranwal 0c987f433d
string: enable test for string escaping (#6688) 2020-10-27 15:25:44 +01:00
Alexander Medvednikov 55536bb364 autofree: handle more statements 2020-10-18 00:48:06 +02:00
Delyan Angelov 46c5a2c8fc v test-fmt: fix some embedded comments in expressions 2020-10-14 22:52:33 +03:00
Delyan Angelov ce302c29e4 builtin: support also [abc,def].sort(b>a) 2020-10-06 21:33:15 +03:00
Daniel Däschle abc98c273c
parser: require assign on type alias (#6477) 2020-09-25 12:02:32 +02:00
Alexander Medvednikov 403cd0d915 Revert "gen: scape string function in gen/str.v (#6452)"
This reverts commit 60fbcc37fc.
2020-09-24 18:19:18 +02:00
Marcin 60fbcc37fc
gen: scape string function in gen/str.v (#6452) 2020-09-24 18:18:10 +02:00
Swastik Baranwal 077b597bd8
scanner/parser: change error msgs for `\0` and `\x00` and add error for r`byte` and c`byte` (#6436) 2020-09-21 17:34:24 +03:00
Swastik Baranwal 1c886ad067
scanner: add check for `!is_raw` for null `\0` (#6427) 2020-09-19 19:09:18 +03:00
Oghogho Odemwingie 332f3a924c
builtin: consume matched string length in string.replace_each (#6349) 2020-09-12 02:31:06 +02:00
Alexander Medvednikov 6921d46185 all: rune type for `` literals 2020-08-27 06:46:37 +02:00
Delyan Angelov 36eae1c175
builtin: x.vstring() instead of string(x) (#6102) 2020-08-10 18:05:26 +02:00
Alexander Medvednikov 64f218e943 string: fix all cap .title() test 2020-08-09 04:09:48 +02:00
Alexander Medvednikov c65dbe51d6 parser: c2v fixes 2020-08-09 03:58:14 +02:00
Lukas Neubert f2c639c869
builtin: add string.contains_any() (#5963) 2020-07-29 21:48:50 +02:00
Delyan Angelov 276c1de190 unsafe: tag with unsafe{} some more pointer manipulations 2020-07-22 21:42:51 +03:00
Delyan Angelov e5a5e76a30 cgen: fix for passing functions as voidptr args 2020-07-13 19:45:13 +03:00
Swastik Baranwal b5b5176f9b
string: add filter method (#5812) 2020-07-12 21:07:28 +03:00
Delyan Angelov 78e1127d99
cgen: treat the main module like any other v module 2020-07-01 00:53:53 +02:00