mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Introduce at_char_boundary
function
This commit is contained in:
parent
cfdbbd6726
commit
00ac3a64ba
Notes:
git
2023-08-25 23:58:23 +00:00
4 changed files with 12 additions and 8 deletions
2
file.c
2
file.c
|
@ -4610,7 +4610,7 @@ rmext(const char *p, long l0, long l1, const char *e, long l2, rb_encoding *enc)
|
|||
if (l1 < l2) return l1;
|
||||
|
||||
s = p+l1-l2;
|
||||
if (rb_enc_left_char_head(p, s, p+l1, enc) != s) return 0;
|
||||
if (!at_char_boundary(p, s, p+l1, enc)) return 0;
|
||||
#if CASEFOLD_FILESYSTEM
|
||||
#define fncomp strncasecmp
|
||||
#else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue