Skip to content

Commit f2a5e8a

Browse files
author
Sriya Pratipati
committed
added more descriptive comment
1 parent a01af70 commit f2a5e8a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

libc/src/wchar/wchar_utils.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ LIBC_INLINE bool internal_wcschr(wchar_t c, const wchar_t *str) {
2626
return false;
2727
}
2828

29-
// To avoid duplicated code, call this with true for wcscspn and call with false
30-
// for wcsspn
29+
// bool should be true for wcscspn for complimentary span
30+
// should be false for wcsspn since we want it to span
3131
LIBC_INLINE size_t inline_wcsspn(const wchar_t *s1, const wchar_t *s2,
32-
bool match_set) {
32+
bool not_match_set) {
3333
size_t i = 0;
3434
for (; s1[i]; ++i) {
3535
bool in_set = internal_wcschr(s1[i], s2);
36-
if (in_set == match_set)
36+
if (in_set == not_match_set)
3737
return i;
3838
}
3939
return i;

0 commit comments

Comments
 (0)