Skip to content

Commit ab80710

Browse files
committed
karm-core: Add comparator helper for case-insensitive ascii.
1 parent 4ee5d4d commit ab80710

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/karm-core/base/string.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,10 @@ bool eqCi(_Str<E> a, _Str<E> b) {
268268
return true;
269269
}
270270

271+
export bool eqAsciiCi(Rune a, Rune b) {
272+
return toAsciiLower(a) == toAsciiLower(b);
273+
}
274+
271275
export template <StaticEncoding Target, StaticEncoding Source>
272276
_String<Target> transcode(_Str<Source> str) {
273277
usize len = transcodeLen<Source, Target>(str);

0 commit comments

Comments
 (0)