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

156 Commits

Author SHA1 Message Date
Delyan Angelov
c286775d9f
strconv: add test_atof_converter to the tests, as suggested by the code review 2022-11-21 07:41:41 +02:00
Delyan Angelov
6cd1723deb
strconv: fix float_prec := 1.9999999999999999 + 0.0000000000000000005 being 0.5 (fix #16448) (#16495) 2022-11-21 03:57:51 +03:00
yuyi
017ace6ea7
vfmt: change all '$expr' to '${expr}' (#16428) 2022-11-15 16:53:13 +03:00
Subhomoy Haldar
43b9a716c5
builtin,strconv: append ".0", to float string representations, to ensure clarity (#16079) 2022-10-17 15:41:07 +03:00
Delyan Angelov
d857e97d8c
strconv: enable VTL compilation with -prod (remove deprecation for strconv.v_sprintf temporarily) 2022-10-16 17:43:52 +03:00
yuyi
f6844e9766
all: change optional to result of io (#16075) 2022-10-16 09:28:57 +03:00
Delyan Angelov
fc8e3d0971
builtin,strconv: speedup str.int() conversions (without -prod) 2022-09-08 11:28:19 +03:00
Alexander Medvednikov
2dde7ff5ba strconv: deprecate v_sprintf in favor of string interpolation 2022-08-23 09:53:05 +03:00
Delyan Angelov
928dafeb6d
strconv: make f64_to_str_lnd1 public (fix building vlang/coreutils printf) 2022-05-30 22:14:22 +03:00
Daniel Däschle
d679146a80
fmt: remove space in front of ? and ! (#14366) 2022-05-13 06:56:21 +03:00
Larpon
1c48a8d760
strconv: add missing doc strings (#14164) 2022-04-26 18:09:36 +03:00
Alexander Medvednikov
78cb6e2b41 all: handle fixed []u8 2022-04-15 18:35:56 +03:00
Alexander Medvednikov
fbb9e65c0f all: ~500 more byte=>u8 2022-04-15 18:25:45 +03:00
Alexander Medvednikov
fb192d949b all: replace []byte with []u8 2022-04-15 15:35:35 +03:00
Alexander Medvednikov
d4a0d6f73c all: byte => u8 2022-04-15 14:58:56 +03:00
Alexander Medvednikov
014c3c97f0 all: byte => u8 2022-04-15 14:45:52 +03:00
Delyan Angelov
843ce43077
strconv: cleanup atof.c.v - use a ParserState enum, clarify comments 2022-04-11 12:01:47 +03:00
yuyi
e3dca82f9c
strconv: minor cleanup in f64_to_str_lnd1() (#13804) 2022-03-22 20:15:59 +02:00
yuyi
56f5ed4789
strconv: fix error for string interpolation of float format (#13800) 2022-03-22 12:00:18 +02:00
Delyan Angelov
a3e9409196
strconv: fix a double free bug in v_sprintf/remove_tail_zeros_old, reduce leaks 2022-03-11 19:32:08 +02:00
yuyi
795fe5844c
strconv: fix strconv.v_printf() (#13716) 2022-03-11 17:00:57 +02:00
Delyan Angelov
9c24d09dc3
strconv: bug fix for "${239.5:0.0f}" (#13483) 2022-02-16 11:33:29 +03:00
Vincenzo Palazzo
7f29418c63
strconv: change atof64 to return an error, if the parsed value is not a valid number (#13424) 2022-02-10 13:27:32 +02:00
Benjamin Stigsen
ceb05b163a
strings: rename Builder.write_b() to Builder.write_byte(), add deprecation (#13313) 2022-01-28 20:34:44 +02:00
playX
ec91de3504
builtin: use dlmalloc for -freestanding (#13054) 2022-01-06 14:10:37 +02:00
jeffmikels
a60b381d5e
docs: adding skeleton README.md files for all vlib modules (#13034) 2022-01-05 18:06:08 +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
Delyan Angelov
33163238e7
strconv: add a small performance optimisation 2021-12-03 20:14:14 +02:00
Larpon
8494e387ec
strconv: fix format.md example snippets (#12642) 2021-12-01 17:23:35 +02:00
playX
a8a1e9381f
strconv,js: f64_to_str works on JS backend now; Fix BigInt usage in infix expressions (#12464) 2021-11-15 14:13:44 +02:00
playX
e3d98b1b28
js,strconv: port some functions to JS backend, improve rune.str() (#12460) 2021-11-14 21:06:58 +02:00
Delyan Angelov
6e4bda3741
strconv: fix string builder leaks in format_dec_old, format_es_old, format_fl_old, v_sprintf 2021-10-17 19:46:34 +03:00
penguindark
f3757a7cd1
strconv: float memory leak fix (#11980) 2021-09-26 07:33:35 +03:00
Alexander Medvednikov
ae41d1d3c6 builtin, cgen: more -nofloat fixes 2021-09-13 19:06:19 +03:00
playX
07bd61582c
js: fix strconv build, BigInt infix fix (#11464) 2021-09-11 00:11:36 +03:00
yuyi
e5360e164a
fmt: remove unnecessary parentheses after return (fix #11423) (#11435) 2021-09-08 14:19:53 +03:00
playX
08c517c966
strconv,v.gen.js: proper optionals returns, strconv compiles to the JS backend (#11364) 2021-09-03 12:16:07 +03:00
yuyi
4d078edb72
scanner: no longer allow 1. float literals (#11301) 2021-08-25 14:39:37 +03:00
zakuro
490dec222f
fmt: keep char literal, ' (#11060) 2021-08-06 06:21:28 +03:00
shadow
66bc8bc0cb
vlib: remove many deprecated functions (#10972) 2021-07-28 09:22:19 +03:00
Delyan Angelov
54dd510ace
strconv: fix compilation with -cc gcc -cstrict -prod 2021-07-15 01:05:00 +03:00
Flinner
1486258591
strconv: fix atoi returning 0 on large strings (#10635) 2021-07-02 10:39:57 +03:00
Delyan Angelov
a3f876d683
strconv: use [if debug_strconv?] for fn assert1 2021-06-22 10:33:48 +03:00
Delyan Angelov
aea23e8a40
strconv: fix fxx_to_str_l_parse/fxx_to_str_l_parse_no_dot returning s without cloning 2021-06-19 07:48:46 +03:00
Delyan Angelov
de384f1cc8
strconv: vfmt everything 2021-06-18 17:59:56 +03:00
Delyan Angelov
5dff8dc097
v.fmt: keep [ ... \n 123, // end of line comment \n ... ] as is 2021-06-18 16:43:03 +03:00
Uwe Krüger
60c880a0cc
vlib: use malloc_noscan() where possible (#10465) 2021-06-15 14:47:11 +03:00
Uwe Krüger
0ff2d9ef78
strconv: fix memory corruption (#10250) 2021-05-29 16:24:09 +03:00
penguindark
d8d05e0106
all: new string interpolation in pure V (#10181) 2021-05-24 05:20:45 +03:00