Skip to content

Commit ef10e8e

Browse files
author
Sriya Pratipati
committed
renamed function
1 parent d43e66d commit ef10e8e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

libc/src/wchar/wchar_utils.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
namespace LIBC_NAMESPACE_DECL {
1818
namespace internal {
1919

20-
bool check_span(wchar_t c, const wchar_t *str) {
20+
// returns true if the character exists in the string
21+
LIBC_INLINE bool internal_wcschr(wchar_t c, const wchar_t *str) {
2122
for (int n = 0; str[n]; ++n) {
2223
if (str[n] == c)
2324
return true;
@@ -31,7 +32,7 @@ LIBC_INLINE size_t inline_wcsspn(const wchar_t *s1, const wchar_t *s2,
3132
bool invert) {
3233
size_t i = 0;
3334
for (; s1[i]; ++i) {
34-
bool check = check_span(s1[i], s2);
35+
bool check = internal_wcschr(s1[i], s2);
3536
check = invert ? !check : check;
3637
if (!check)
3738
return i;

0 commit comments

Comments
 (0)