diff options
author | Nicholas Noll <nbnoll@eml.cc> | 2021-12-05 09:47:21 -0800 |
---|---|---|
committer | Nicholas Noll <nbnoll@eml.cc> | 2021-12-05 10:54:20 -0800 |
commit | 521d01e8ad87e931af3e9a763cc84a6cf7fe5ee3 (patch) | |
tree | f544119060c3eefc7b0fec6cff1740a362541213 /src/base/string/replace.c | |
parent | 158d9b84f14457136379f42e7c071eb79d87ee6b (diff) |
Feat: basic string and memory functions
Continue filling out the basic standard lib functions.
Included prototypes of the str* and mem* families.
Plan to add e(str|mem) and n(str|mem) variants as well.
Diffstat (limited to 'src/base/string/replace.c')
-rw-r--r-- | src/base/string/replace.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/base/string/replace.c b/src/base/string/replace.c index 127daed..979c385 100644 --- a/src/base/string/replace.c +++ b/src/base/string/replace.c @@ -4,13 +4,13 @@ // edits are done in place and modify the string. // NOTE: as of now strings from and to must be the same size. void -str·replace(string s, const byte* from, const byte* to) +string·replace(string s, byte* from, byte* to) { vlong fromL = strlen(from); vlong toL = strlen(to); if (toL != fromL) { panicf("different sized replacement string not supported"); } - vlong l = str·len(s); + vlong l = string·len(s); vlong i = l; vlong j = l; |