readme update

This commit is contained in:
2026-04-30 10:35:42 -04:00
parent bab73d1d83
commit 33f04eb9cd
6 changed files with 13 additions and 4 deletions

View File

@ -1,3 +1,8 @@
# amscpptemplate25a # amsstring4
std::strings are awkward. Also, you can never trust the standard library. std::vector<bool> anyone?
This is a mutable ASCII/UTF-8 string class with every convenience feature I can think of added in, portability shims for MSVC, and support for converting to/from unicode codepoints.
Depends on amsarrays from amsmathutil25 for handling arrays of strings.
Rearrange my C++ project template in an attempt to harmonize everything and modernize my build scripts.

Binary file not shown.

View File

@ -174,6 +174,10 @@ amsarray<amsstring> splitwhitespace(const amsstring &s);
amsstring stripwhitespace(const amsstring &s); amsstring stripwhitespace(const amsstring &s);
amsstring stripallwhitespace(const amsstring &s); amsstring stripallwhitespace(const amsstring &s);
//splits a string into contiguous sets of alphanumeric characters ignoring non-alphanums
amsarray<amsstring> splitalphanum(const amsstring &s); //
//splits into two guaranteed pieces //splits into two guaranteed pieces
//if an extension separator . is not encountered, the first piece will contain the entire string, the second "" //if an extension separator . is not encountered, the first piece will contain the entire string, the second ""
amsarray<amsstring> splitext(const amsstring &s); amsarray<amsstring> splitext(const amsstring &s);

View File

@ -379,8 +379,8 @@ amsarray<amsstring> splitpath(const amsstring &s)
ret.resize(2); ret.resize(2);
int ind1,ind2; int ind1,ind2;
ind1 = s.find('/'); ind1 = s.findright('/');
ind2 = s.find('\\'); ind2 = s.findright('\\');
if(ind1>=0) if(ind1>=0)
{ {
if(ind1==0) if(ind1==0)