aboutsummaryrefslogtreecommitdiff
path: root/core/strings
Commit message (Collapse)AuthorAgeFilesLines
* Remove unneeded slicing in `strings.clone`Feoramund2025-03-051-1/+1
|
* Fix #4890Feoramund2025-02-271-1/+24
| | | | | | `strings.to_cstring` previously would not check if the buffer could handle the extra null byte and could lead to segmentation violations when using the resulting string in an API expecting the terminator.
* Small optimizationJacob Friedman2025-02-041-1/+3
|
* Fix unicode handlingJacob Friedman2025-02-041-1/+6
|
* Fix strings.split_iterator when separator is emptyJacob Friedman2025-02-041-6/+2
|
* strings: use map_entryLaytan Laats2025-01-081-5/+11
|
* improve `strings.index_multi`Adam Zadrożny2024-12-041-1/+2
| | | | | | | There's no point searching for substrings after lowest_index, so let's not. This significantly improves performance on long strings.
* Fix #4359Jeroen van Rijn2024-10-091-1/+1
| | | | Fixes #4359
* wasm: support more vendor librariesLaytan Laats2024-09-091-7/+7
| | | | | | | | Adds support for: - box2d - cgltf - stb image - stb rect pack
* Merge pull request #4192 from laytan/strings-substring-rune-wiseJeroen van Rijn2024-09-031-0/+103
|\ | | | | strings: add `substring`, `substring_to` and `substring_from`
| * strings: add `substring`, `substring_to` and `substring_from`Laytan Laats2024-09-031-0/+103
| |
* | strings.cut without allocation.Jeroen van Rijn2024-09-031-42/+53
|/
* Fix random typogingerBill2024-08-191-1/+1
|
* Add `strings.contains_space`gingerBill2024-08-191-0/+11
|
* Merge pull request #3971 from jasonKercher/os2-process-linuxgingerBill2024-08-161-1/+4
|\ | | | | os2 process linux implementation
| * update core:filepath's clean, join and split_list to return optional ↵jason2024-08-161-1/+4
| | | | | | | | Allocator_Errors
* | Minor style changegingerBill2024-08-131-2/+2
| |
* | Merge `core:simd/util` into `core:bytes`Feoramund2024-08-101-32/+3
| |
* | Make `simd_util` index procs `contextless` where applicableFeoramund2024-08-091-2/+2
| |
* | Simplify and make `simd_util` cross-platformFeoramund2024-08-091-14/+4
| | | | | | | | | | | | | | | | This new algorithm uses a Scalar->Vector->Scalar iteration loop which requires no masking off of any incomplete data chunks. Also, the width was reduced to 32 bytes instead of 64, as I found this to be about as fast as the previous 64-byte x86 version.
* | Use vectorized `index_*` procs in `core`Feoramund2024-08-061-8/+39
|/
* Add aliases `starts_with` and `ends_with`gingerBill2024-07-101-0/+6
|
* Remove nil checks.Jeroen van Rijn2024-07-061-9/+1
| | | | | | | The caller should really not pass `foo: ^string = nil`. A `for ch, in foo` would also crash, so let's not introduce new semantics for iteration. A caller shouldn't pass garbage if they can help it, and a `nil` ^string is not a useful ZII usage here.
* Fix loads of indentation issues with mixing spaces and tabsgingerBill2024-06-291-1/+1
|
* Made default capacity of dynamic arrays more consistent.Karl Zylinski2024-06-291-6/+6
| | | | | | | | | 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.
* Merge pull request #3517 from timosperisen/patch-1gingerBill2024-06-281-2/+2
|\ | | | | Update builder.odin
| * Update builder.odinTimo2024-04-291-2/+2
| | | | | | | | | | Modify documentation-text for procedure write_f64 : change type f32 to f64
* | drop unnecessary deferJustin Snyder2024-06-191-1/+1
| |
* | fix typoJustin Snyder2024-06-191-1/+1
| | | | | | | | apparently i had a moment of dyslexia
* | trim added null byteJustin Snyder2024-06-191-16/+3
| |
* | Add builder to_cstringJustin Snyder2024-06-191-0/+27
| |
* | Update `tests\core\encoding\cbor` to use new test runner.Jeroen van Rijn2024-06-021-4/+4
| | | | | | | | | | | | 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.
* | Correct #soa RTTI usagegingerBill2024-05-161-2/+2
|/
* correct newly found vetsLaytan Laats2024-04-031-1/+1
|
* Replace `core:*` to `base:*` where appropriategingerBill2024-01-282-2/+2
|
* fix strings.last_index_any for single charWalther Chen2023-12-181-1/+2
|
* strings: Fix up documentation of split_nflysand72023-12-051-0/+1
|
* Expose strings.ascii_set_* functionsFourteenBrush2023-11-121-1/+0
|
* Strings makes added caller functionPix2023-08-151-23/+23
|
* Intern add location to init.Pix2023-08-151-2/+2
|
* Builder makes added caller locationPix2023-08-151-12/+12
|
* Replace `x in &y` Use `&v in y` syntax through core & vendor for ↵gingerBill2023-06-261-4/+4
| | | | `switch`/`for` statements
* Update to new io interfacegingerBill2023-06-082-64/+35
|
* Fix indentationdev-2023-05gingerBill2023-05-031-3/+3
|
* update builder sampleJon Lipstate2023-04-261-6/+5
|
* fix typo, add builder sampleJon Lipstate2023-04-262-2/+28
|
* Document return values of strings and add allocator errors whereLucas Perlind2023-04-076-389/+454
| | | | possible
* correct errorsJon Lipstate2023-04-051-2/+0
|
* Small improvements strings documentationLucas Perlind2023-04-036-401/+484
| | | | | | | | * 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
* Enforce example names in documentationLucas Perlind2023-04-013-64/+64
|