Karl Zylinski
679f9b4e41
Made default capacity of dynamic arrays more consistent.
...
Before this if you do `arr: [dynamic]int` and then append to arr, then it will have capacity 8.
But if you did `arr := make([dynamic]int, context.temp_allocator)` then arr would have capacity 16.
Now both `arr: [dynamic]int` and `arr := make([dynamic]int, context.temp_allocator)` will resut in arr having zero 0. The only reason to use `make` without an explicit len or cap now is because you want to set it up for a non-default allocator. After the first call to `append` it will now in both cases have capacity 8.
I also updated the documentation on the strings builder, both to reflect this, and also to fix it incorrectly saying that len would be 'max(16,len)', which wasn't true even before these changes.
2024-06-29 08:57:21 +02:00
gingerBill
853173a11b
Merge pull request #3517 from timosperisen/patch-1
...
Update builder.odin
2024-06-28 12:00:23 +01:00
Justin Snyder
1a6bb59125
drop unnecessary defer
2024-06-19 18:25:42 -06:00
Justin Snyder
271782d2f4
fix typo
...
apparently i had a moment of dyslexia
2024-06-19 17:53:34 -06:00
Justin Snyder
1b7c4c2efe
trim added null byte
2024-06-19 17:35:16 -06:00
Justin Snyder
8f2c4a7ecf
Add builder to_cstring
2024-06-19 11:55:19 -06:00
Jeroen van Rijn
a27b167218
Update tests\core\encoding\cbor to use new test runner.
...
It was leaky and required a substantial number of `loc := #caller_location` additions to parts of the core library to make it easier to track down how and where it leaked.
The tests now run fine multi-threaded.
2024-06-02 14:47:07 -04:00
gingerBill
7cf62f00c3
Correct #soa RTTI usage
2024-05-16 16:30:45 +01:00
Timo
2918baa3e8
Update builder.odin
...
Modify documentation-text for procedure write_f64 :
change type f32 to f64
2024-04-29 20:22:53 +02:00
Laytan Laats
3a0df80066
correct newly found vets
2024-04-03 00:52:58 +02:00
gingerBill
3e7e779abf
Replace core:* to base:* where appropriate
2024-01-28 22:18:51 +00:00
Walther Chen
031b0cc534
fix strings.last_index_any for single char
2023-12-18 11:55:45 -05:00
flysand7
2e1b2dc3ba
strings: Fix up documentation of split_n
2023-12-05 23:17:19 +11:00
FourteenBrush
e0ac454ed0
Expose strings.ascii_set_* functions
2023-11-12 17:33:33 +01:00
Pix
2ab5eb7213
Strings makes added caller function
2023-08-15 12:31:06 +08:00
Pix
5ce541e9ef
Intern add location to init.
2023-08-15 12:30:50 +08:00
Pix
0cf9c22033
Builder makes added caller location
2023-08-15 12:30:40 +08:00
gingerBill
3dec55f009
Replace x in &y Use &v in y syntax through core & vendor for switch/for statements
2023-06-26 15:42:57 +01:00
gingerBill
3f6775e29b
Update to new io interface
2023-06-08 16:35:24 +01:00
gingerBill
0c3522133d
Fix indentation
2023-05-03 14:22:38 +01:00
Jon Lipstate
f9b5f2b7b1
update builder sample
2023-04-26 18:04:24 -07:00
Jon Lipstate
67fa5df89c
fix typo, add builder sample
2023-04-26 18:00:14 -07:00
Lucas Perlind
e0d9092df8
Document return values of strings and add allocator errors where
...
possible
2023-04-07 20:39:01 +10:00
Jon Lipstate
0f1c5b3891
correct errors
2023-04-05 22:22:16 -07:00
Lucas Perlind
67e6f57192
Small improvements strings documentation
...
* Use new 'Returns:' and 'Inputs:' keywords used by the website generator
* Make order item order resemble website, i.e. 'Returns:' comes before
'Example:'
* Add a few missing input items
* Add a few missing return items
2023-04-03 08:44:14 +10:00
Lucas Perlind
6ff0cc0b40
Enforce example names in documentation
2023-04-01 09:13:15 +11:00
Lucas Perlind
84d8798ad3
Fix website formatting and incorrect examples
2023-03-29 12:19:05 +11:00
Jon Lipstate
bbafc3fbd6
harmonize to use null for c-string endings
2023-03-28 11:57:12 -07:00
Jon Lipstate
194fa7cd98
rename nul to null, allocation clarifications
2023-03-28 11:51:39 -07:00
Jon Lipstate
6dce07790a
add backticks on variables, code review comments
2023-03-28 11:07:33 -07:00
Jon Lipstate
203ae32b79
pr pickups
2023-03-28 10:24:41 -07:00
Jon Lipstate
937e5de1d8
add missing eof newline
2023-03-27 22:23:13 -07:00
Jon Lipstate
7de67f8c1b
markdown compliant spaces
2023-03-27 22:20:24 -07:00
Jon Lipstate
f5d66bcb6f
transform into odin-site parsable format
2023-03-27 22:00:53 -07:00
Jon Lipstate
bf82c40964
string code docs
2023-03-27 20:09:51 -07:00
oskarnp
e449cc9e2d
Fix strings.to_ada_case()
2023-03-23 21:30:24 +01:00
gingerBill
74fb74d9cb
Keep -vet happy
2023-03-16 16:41:22 +00:00
gingerBill
97d7e295dd
Fix to split_multi_iterator
2023-03-16 16:35:30 +00:00
gingerBill
0727e91aeb
Simplify the implementation of strings.split_multi; add strings.index_multi
2023-03-16 16:30:48 +00:00
gingerBill
e05944601a
Minor fixes
2023-03-16 13:35:38 +00:00
William Roe
63b5d472fa
Fix documentation example of strings.to_upper
...
This looks like it was a copy/paste mistake
2023-03-10 16:07:06 +00:00
gingerBill
133af6f826
Remove delete with wrong allocator
2023-03-07 15:24:59 +00:00
gingerBill
986cba584e
Add runtime.DEFAULT_TEMP_ALLOCATOR_TEMP_GUARD where appropriate
2023-02-10 16:23:33 +00:00
Jeroen van Rijn
677e7ff642
Don't write leading + unless +Inf or we ask for it.
2022-11-14 16:32:50 +01:00
gingerBill
ab00db2ebd
Add write_(f16|f32|f64) calls
2022-11-14 12:37:55 +00:00
Colin Davidson
0a0e8f36eb
add floats to string builder
2022-11-14 04:30:14 -08:00
gingerBill
c4d19dfa92
Use uint instead of int to improve code generation for bounds checking
2022-09-27 22:31:46 +01:00
gingerBill
f50fc33749
Clean up of the core library to make the stream vtables not be pointers directly.
2022-09-15 10:00:50 +01:00
Adam Rasburn
0f036eebc0
doc fix for strings.last_index_any
2022-09-12 07:37:15 +12:00
gingerBill
e008eeac6a
Simplify package io by removing different unnecessary types and calls
2022-09-11 15:42:08 +01:00