diff options
| author | Jon Lipstate <Jon@Lipstate.com> | 2023-03-28 10:24:41 -0700 |
|---|---|---|
| committer | Jon Lipstate <Jon@Lipstate.com> | 2023-03-28 10:24:41 -0700 |
| commit | 203ae32b797b758cf98c49db18752cee02c1c7e7 (patch) | |
| tree | f209f4f78963af85c40bcfad139d9750b5452c94 /core/strings/strings.odin | |
| parent | 937e5de1d8676c8ae25a8e4b52d2272277aad396 (diff) | |
pr pickups
Diffstat (limited to 'core/strings/strings.odin')
| -rw-r--r-- | core/strings/strings.odin | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/strings/strings.odin b/core/strings/strings.odin index 36b244d27..118faadab 100644 --- a/core/strings/strings.odin +++ b/core/strings/strings.odin @@ -2078,7 +2078,7 @@ is_null :: proc(r: rune) -> bool { return r == 0x0000 } /* -Finds the index of the first rune in the string s for which the procedure p returns the same value as truth +Find the index of the first rune r in string s for which procedure p returns the same as truth, or -1 if no such rune appears. **Inputs** - s: The input string @@ -2777,7 +2777,7 @@ Centers the input string within a field of specified length by adding pad string **Inputs** - str: The input string -- length: The desired length of the centered string +- length: The desired length of the centered string, in runes - pad: The string used for padding on both sides - allocator: (default is context.allocator) @@ -2876,8 +2876,8 @@ Writes a given pad string a specified number of times to an io.Writer **Inputs** - w: The io.Writer to write the pad string to - pad: The pad string to be written -- pad_len: The length of the pad string -- remains: The number of times to write the pad string +- pad_len: The length of the pad string, in runes +- remains: The number of times to write the pad string, in runes */ @private write_pad_string :: proc(w: io.Writer, pad: string, pad_len, remains: int) { @@ -2956,7 +2956,7 @@ fields :: proc(s: string, allocator := context.allocator) -> []string #no_bounds return a } /* -Splits a string into a slice of substrings at each run of unicode code points `ch` satisfying the predicate f(ch) +Splits a string into a slice of substrings at each run of unicode code points `r` satisfying the predicate f(r) *Allocates Using Provided Allocator* |