diff options
author | Nicholas Noll <nbnoll@eml.cc> | 2021-12-10 09:16:08 -0800 |
---|---|---|
committer | Nicholas Noll <nbnoll@eml.cc> | 2021-12-10 09:16:08 -0800 |
commit | 25537c3d3b9b68af91573dec39d1f46c3d97f735 (patch) | |
tree | 3f2ea6207a28fe9610d767dd78fb24d17f858ce0 /src/base/string/make.c | |
parent | f4aef385bdd41b02ef58b5366fa9318ecdc6e37e (diff) |
Checkin: small sprawling updates
Small touches to multiple locations in base.
Nothing major
Diffstat (limited to 'src/base/string/make.c')
-rw-r--r-- | src/base/string/make.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/base/string/make.c b/src/base/string/make.c index 50b8b98..ca38984 100644 --- a/src/base/string/make.c +++ b/src/base/string/make.c @@ -4,7 +4,7 @@ // len defines the length of the c substring that we will copy into our buffer. // the backing buffer will have capacity cap. string -string·makecap(byte *s, vlong len, vlong cap) +string·nnmake(byte *s, vlong len, vlong cap) { struct Hdr* h; @@ -34,13 +34,13 @@ cleanup: // new returns a new dynamic string object, initialized from the given c string. // the backing buffer capacity is equivalent to the string length. string -string·makelen(byte *s, vlong len) +string·nmake(byte *s, vlong len) { vlong sl = (!s) ? 0 : str·len(s); if(sl < len) panicf("attempted to take a bigger substring than string length"); vlong cap = (len == 0) ? 1 : len; - return string·makecap(s, len, cap); + return string·nnmake(s, len, cap); } // new returns a new dynamic string object, initialized from the given c string. @@ -49,5 +49,5 @@ string string·make(byte *s) { vlong len = (!s) ? 0 : str·len(s); - return string·makelen(s, len); + return string·nmake(s, len); } |