1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
Commit Graph

126 Commits

Author SHA1 Message Date
Don Alfons Nisnoni
b9728c7af0 string: update split() method 2019-11-10 19:37:36 +03:00
Alexander Medvednikov
987f5fd2a1 string: bring back strconv 2019-11-01 00:28:52 +03:00
Alexander Medvednikov
4c96ca4e62 string: remove strconv dep 2019-10-31 21:50:11 +03:00
Alexander Medvednikov
128d37c671 vh fixes for the UI module 2019-10-31 21:26:12 +03:00
Don Alfons Nisnoni
8358528888 string: add some docs 2019-10-27 22:29:55 +03:00
joe-conigliaro
a075ce160e compiler: add [..2] & [2..] support for slices 2019-10-27 09:36:04 +03:00
Alexander Medvednikov
dc2c62807a string: faster int() 2019-10-25 23:41:18 +03:00
Alexander Medvednikov
ea3f9b5b9a remove execinfo.h header 2019-10-25 12:13:38 +03:00
Alexander Medvednikov
4a88a28a3b make all necessary structs public 2019-10-24 12:51:00 +03:00
joe-conigliaro
8d16762f03 strconv module + use it in builtin/string instead of C functions 2019-10-17 19:37:55 +03:00
Alexander Medvednikov
75e2a29cb5 string: bring back strtoul for now 2019-10-15 08:53:35 +03:00
Alexander Medvednikov
4b176ba855 string: test i64() and u64() 2019-10-15 04:26:19 +03:00
Alexander Medvednikov
2d127cb694 tcc windows fixes 2019-10-14 09:03:11 +03:00
Alexander Medvednikov
a280e98d7f fix the build 2019-10-11 06:57:08 +03:00
Alexander Medvednikov
726aaecc46 compiler: make V compilable wit the tcc backend 2019-10-11 06:49:53 +03:00
joe-conigliaro
f8fefd5a60 urllib: rem underscore methods from; add strings index_bytes 2019-10-10 20:04:11 +03:00
Alexander Medvednikov
b242e8d7ff optimize a in [1,2,3] to a == 1 || a == 2 || a == 3 2019-10-06 06:07:38 +03:00
Alexander Medvednikov
52f4f4026b
compiler: cache modules 2019-10-04 15:48:09 +03:00
Delyan Angelov
6bba4b1be0 string: document the tradeoffs for V strings 2019-09-28 13:54:30 +03:00
lutherwenxu
a4d2633a33 string: Properly null-terminate repeated string 2019-09-28 13:31:12 +03:00
Alexander Medvednikov
a5391c8882 string.repeat: re-write without a libc function call 2019-09-28 02:51:42 +03:00
Alvydas Vitkauskas
931b71c428 string: improve repeat() 2019-09-27 15:49:09 +03:00
Don Alfons Nisnoni
fb4f14ba76 string: add repeat() method 2019-09-26 22:54:53 +03:00
Alexander Medvednikov
f7d8fb0cf4 string: bring back old index() without an allocation 2019-09-23 23:34:42 +03:00
Henrixounez
ffcff9ebd4 builtins: ustring comparisons, concatenation and other functions 2019-09-20 19:07:38 +03:00
Alexander Medvednikov
a94c1556ce array: remove temporary repeat2() 2019-09-19 05:22:24 +03:00
Alexander Medvednikov
849bef987c more C warnings fixed 2019-09-15 15:53:57 +03:00
Alexander Medvednikov
3e923871cf compiler: use *char() cast in C functions to afix warnings 2019-09-15 15:19:18 +03:00
Alexander Medvednikov
5cc81b91cb JavaSript backend (early stage) 2019-09-15 03:49:57 +03:00
Alexander Medvednikov
9dd86f6fb8 compiler: more memory logic + replace "cur_fn &Fn" with "cur_fn Fn" 2019-09-13 15:47:31 +03:00
Alexander Medvednikov
9853323157 array: make ".contains()" private, use "in" everywhere 2019-09-11 15:12:13 +03:00
Alexander Medvednikov
00687de43b memory: clean up all arrays in the V compiler 2019-09-09 13:55:47 +03:00
joe-conigliaro
79d4d56fe5 string: implement is_space in V & make trim_space use trim 2019-09-06 13:22:37 +03:00
Delyan Angelov
c9a39dfdb5 compiler: build tetris executable on windows with both msvc and mingw gcc 2019-09-03 16:09:43 +03:00
Alexander Medvednikov
0e2c41e0f9 replace *Foo with &Foo everywhere 2019-09-01 22:51:16 +03:00
Alexander Medvednikov
3bd7bcfac3 remove u8 and i32 aliases 2019-09-01 22:37:22 +03:00
joe-conigliaro
02fc7e14cd make trim use cutset like trim_right/trim_left 2019-08-27 22:53:32 +03:00
joe-conigliaro
857cf00caf builtin.string: make trim_left/right() behave correctly 2019-08-26 14:18:58 +03:00
Swastik Baranwal
db525524ee string: title() and small fixes 2019-08-26 13:32:53 +03:00
Alexander Medvednikov
fe2d2bd2a3 fmt: remove trailing spaces 2019-08-17 22:21:43 +03:00
Alexander Medvednikov
60bf668281 string: fix trim_right 2019-08-17 20:07:40 +03:00
Alexander Medvednikov
b188ecf680 Makefile: re-write make test in V 2019-08-16 16:51:46 +03:00
Alexander Medvednikov
bc563930f7 string: remove abs() 2019-08-12 21:16:01 +03:00
Alexander Medvednikov
8f8e0dfad7 V ORM 2019-08-10 13:35:29 +02:00
Julian Schurhammer
1864e92ff4 parser: disallow statements after a return, branch check $if, $else, switch, and loops correctly 2019-08-10 10:26:42 +02:00
Julian Schurhammer
61983a6799 parser: check that functions return in all if/else branches 2019-08-08 09:49:56 +02:00
Alexander Medvednikov
52f473d1c7 all: fix immutable fn args 2019-08-07 05:28:00 +02:00
Alexander Medvednikov
bea8f6d7e5 http: remove libcurl dependency; replace it with a simple OpenSSL backend 2019-08-06 13:32:09 +02:00
Alexander Medvednikov
7a7b5040e2 http: fix response headers and status code; clean up ft and gg 2019-08-06 03:06:27 +02:00
Alvydas Vitkauskas
331d6f98ee string: fix bug and add tests for string.count 2019-08-03 22:24:03 +02:00
Alvydas Vitkauskas
bfdce806c4 fix string.count 2019-08-03 03:41:15 +02:00
joe-conigliaro
faf2f9920e string.v: string.count(substr) 2019-08-02 23:30:22 +02:00
joe-conigliaro
d3c89273e8 net.urllib module 2019-08-01 15:01:03 +02:00
Alexander Medvednikov
e0b45e33ea string: fix a bug with split() 2019-07-31 07:26:22 +02:00
Alexander Medvednikov
3a8cdadcf5 free strings 2019-07-25 01:22:45 +02:00
Maciej Sopyło
58577f57c6 fix: segfault when using string.ustring_tmp() 2019-07-24 16:06:12 +02:00
d2verb
88758082d2 scanner.v: refactoring 2019-07-24 00:06:48 +02:00
Rendims
5375038d88 string: avoid double allocation in trim_space() 2019-07-23 00:13:00 +02:00
Alexander Medvednikov
390394b56b string: make substr() copy the data, like in Java and C#; remove .cstr()
this makes managing memory used by strings much easier
V strings are now fully compatible with C strings
2019-07-22 17:03:45 +02:00
Alexander Medvednikov
40c31f701f free arrays when they are out of scope
main.v: update help
2019-07-21 14:42:31 +02:00
Alexander Medvednikov
5c12d13b19 builtin: make string.add() private 2019-07-20 16:43:33 +02:00
joe-conigliaro
8cd1f962d3 implement missing string to int type methods (#1210)
* implement missing string to int methods

* make number base auto detected
2019-07-17 20:11:14 +02:00
joe-conigliaro
a7529b7b05 sha1 implementation + helper funcs 2019-07-15 17:49:01 +02:00
Alexander Medvednikov
3d4cd0bbc0 check integer const overflow at compilation 2019-07-10 21:22:03 +02:00
Alexander Medvednikov
28843a12c7 cache string.hash() 2019-07-10 10:00:12 +02:00
eulerkochy
b40ad7c83f save a byteptr memory, add tests 2019-07-07 22:37:17 +02:00
Alexander Medvednikov
de8dc4cddb hot code reloading examples 2019-07-07 22:02:27 +02:00
Alexander Medvednikov
d47e2f113f Revert "make function arguments immutable"
This reverts commit 0f0ed8d716.
2019-07-05 02:44:22 +02:00
Alexander Medvednikov
0f0ed8d716 make function arguments immutable 2019-07-05 00:24:13 +02:00
Alexander Medvednikov
5d4d3b838b StringsBuilder => strings.Builder; strings.repeat() 2019-07-03 22:18:46 +02:00
Nick Treleaven
75da1e4240 Speed up and simplify string.replace 2019-07-02 21:51:40 +02:00
Alexander Medvednikov
5936ab16c8 fix maps; use maps for storing functions; verify struct initialization 2019-07-01 02:24:39 +02:00
Nick Treleaven
b79defd7a9 Pre-allocate KMP prefix for string.index 2019-06-30 13:58:46 +02:00
Zaoqi
437b32fe78 fmt: id []typ 2019-06-30 13:06:45 +02:00
Alexander Medvednikov
a2b80d5b3d REPL: exit to exit 2019-06-29 22:56:23 +02:00
Alexander Medvednikov
4594d78bd6 move all vlib modules to vlib/ 2019-06-29 12:00:31 +02:00