@@ -866,7 +866,7 @@ string_find(Buffer<enc> buf1, Buffer<enc> buf2, npy_int64 start, npy_int64 end)
866
866
{
867
867
char ch = *buf2;
868
868
CheckedIndexer<char > ind (start_loc, end_loc - start_loc);
869
- result = (npy_intp) findchar (ind, end_loc - start_loc, ch);
869
+ result = (npy_intp) find_char (ind, end_loc - start_loc, ch);
870
870
if (enc == ENCODING::UTF8 && result > 0 ) {
871
871
result = utf8_character_index (
872
872
start_loc, start_loc - buf1.buf , start, result,
@@ -878,7 +878,7 @@ string_find(Buffer<enc> buf1, Buffer<enc> buf2, npy_int64 start, npy_int64 end)
878
878
{
879
879
npy_ucs4 ch = *buf2;
880
880
CheckedIndexer<npy_ucs4> ind ((npy_ucs4 *)(buf1 + start).buf , end-start);
881
- result = (npy_intp) findchar (ind, end - start, ch);
881
+ result = (npy_intp) find_char (ind, end - start, ch);
882
882
break ;
883
883
}
884
884
}
@@ -970,7 +970,7 @@ string_rfind(Buffer<enc> buf1, Buffer<enc> buf2, npy_int64 start, npy_int64 end)
970
970
{
971
971
char ch = *buf2;
972
972
CheckedIndexer<char > ind (start_loc, end_loc - start_loc);
973
- result = (npy_intp) rfindchar (ind, end_loc - start_loc, ch);
973
+ result = (npy_intp) rfind_char (ind, end_loc - start_loc, ch);
974
974
if (enc == ENCODING::UTF8 && result > 0 ) {
975
975
result = utf8_character_index (
976
976
start_loc, start_loc - buf1.buf , start, result,
@@ -982,7 +982,7 @@ string_rfind(Buffer<enc> buf1, Buffer<enc> buf2, npy_int64 start, npy_int64 end)
982
982
{
983
983
npy_ucs4 ch = *buf2;
984
984
CheckedIndexer<npy_ucs4> ind ((npy_ucs4 *)(buf1 + start).buf , end - start);
985
- result = (npy_intp) rfindchar (ind, end - start, ch);
985
+ result = (npy_intp) rfind_char (ind, end - start, ch);
986
986
break ;
987
987
}
988
988
}
@@ -1236,14 +1236,14 @@ string_lrstrip_chars(Buffer<enc> buf1, Buffer<enc> buf2, Buffer<enc> out, STRIPT
1236
1236
case ENCODING::ASCII:
1237
1237
{
1238
1238
CheckedIndexer<char > ind (buf2.buf , len2);
1239
- res = findchar <char >(ind, len2, *traverse_buf);
1239
+ res = find_char <char >(ind, len2, *traverse_buf);
1240
1240
break ;
1241
1241
}
1242
1242
case ENCODING::UTF8:
1243
1243
{
1244
1244
if (current_point_bytes == 1 ) {
1245
1245
CheckedIndexer<char > ind (buf2.buf , len2);
1246
- res = findchar <char >(ind, len2, *traverse_buf);
1246
+ res = find_char <char >(ind, len2, *traverse_buf);
1247
1247
} else {
1248
1248
res = fastsearch (buf2.buf , buf2.after - buf2.buf ,traverse_buf.buf , current_point_bytes, -1 , FAST_SEARCH);
1249
1249
}
@@ -1252,7 +1252,7 @@ string_lrstrip_chars(Buffer<enc> buf1, Buffer<enc> buf2, Buffer<enc> out, STRIPT
1252
1252
case ENCODING::UTF32:
1253
1253
{
1254
1254
CheckedIndexer<npy_ucs4> ind ((npy_ucs4 *)buf2.buf , len2);
1255
- res = findchar <npy_ucs4>(ind, len2, *traverse_buf);
1255
+ res = find_char <npy_ucs4>(ind, len2, *traverse_buf);
1256
1256
break ;
1257
1257
}
1258
1258
}
@@ -1280,14 +1280,14 @@ string_lrstrip_chars(Buffer<enc> buf1, Buffer<enc> buf2, Buffer<enc> out, STRIPT
1280
1280
case ENCODING::ASCII:
1281
1281
{
1282
1282
CheckedIndexer<char > ind (buf2.buf , len2);
1283
- res = findchar <char >(ind, len2, *traverse_buf);
1283
+ res = find_char <char >(ind, len2, *traverse_buf);
1284
1284
break ;
1285
1285
}
1286
1286
case ENCODING::UTF8:
1287
1287
{
1288
1288
if (current_point_bytes == 1 ) {
1289
1289
CheckedIndexer<char > ind (buf2.buf , len2);
1290
- res = findchar <char >(ind, len2, *traverse_buf);
1290
+ res = find_char <char >(ind, len2, *traverse_buf);
1291
1291
} else {
1292
1292
res = fastsearch (buf2.buf , buf2.after - buf2.buf , traverse_buf.buf , current_point_bytes, -1 , FAST_RSEARCH);
1293
1293
}
@@ -1296,7 +1296,7 @@ string_lrstrip_chars(Buffer<enc> buf1, Buffer<enc> buf2, Buffer<enc> out, STRIPT
1296
1296
case ENCODING::UTF32:
1297
1297
{
1298
1298
CheckedIndexer<npy_ucs4> ind ((npy_ucs4 *)buf2.buf , len2);
1299
- res = findchar <npy_ucs4>(ind, len2, *traverse_buf);
1299
+ res = find_char <npy_ucs4>(ind, len2, *traverse_buf);
1300
1300
break ;
1301
1301
}
1302
1302
}
@@ -1331,7 +1331,7 @@ findslice_for_replace(CheckedIndexer<char_type> buf1, npy_intp len1,
1331
1331
return 0 ;
1332
1332
}
1333
1333
if (len2 == 1 ) {
1334
- return (npy_intp) findchar (buf1, len1, *buf2);
1334
+ return (npy_intp) find_char (buf1, len1, *buf2);
1335
1335
}
1336
1336
return (npy_intp) fastsearch (buf1.buffer , len1, buf2.buffer , len2, -1 , FAST_SEARCH);
1337
1337
}
0 commit comments