Abmnpd |STRLEN |is_utf8_char_buf|NN const U8 *buf|NN const U8 *buf_end
AnipdR |bool |is_utf8_string |NN const U8 *s|const STRLEN len
AnidR |bool |is_utf8_string_flags \
- |NN const U8 *s|const STRLEN len|const U32 flags
+ |NN const U8 *s|STRLEN len|const U32 flags
AnidR |bool |is_strict_utf8_string|NN const U8 *s|const STRLEN len
AnidR |bool |is_c9strict_utf8_string|NN const U8 *s|const STRLEN len
Anpdmb |bool |is_utf8_string_loc \
|NN const U8 *s|const STRLEN len|NN const U8 **ep
Andm |bool |is_utf8_string_loc_flags \
- |NN const U8 *s|const STRLEN len|NN const U8 **ep \
+ |NN const U8 *s|STRLEN len|NN const U8 **ep \
|const U32 flags
Andm |bool |is_strict_utf8_string_loc \
|NN const U8 *s|const STRLEN len|NN const U8 **ep
Andm |bool |is_c9strict_utf8_string_loc \
|NN const U8 *s|const STRLEN len|NN const U8 **ep
Anipd |bool |is_utf8_string_loclen \
- |NN const U8 *s|const STRLEN len|NULLOK const U8 **ep \
+ |NN const U8 *s|STRLEN len|NULLOK const U8 **ep \
|NULLOK STRLEN *el
Anid |bool |is_utf8_string_loclen_flags \
- |NN const U8 *s|const STRLEN len|NULLOK const U8 **ep \
+ |NN const U8 *s|STRLEN len|NULLOK const U8 **ep \
|NULLOK STRLEN *el|const U32 flags
Anid |bool |is_strict_utf8_string_loclen \
|NN const U8 *s|const STRLEN len|NULLOK const U8 **ep \
*/
PERL_STATIC_INLINE bool
-S_is_utf8_string_flags(const U8 *s, const STRLEN len, const U32 flags)
+S_is_utf8_string_flags(const U8 *s, STRLEN len, const U32 flags)
{
- const U8* const send = s + (len ? len : strlen((const char *)s));
+ const U8* send;
const U8* x = s;
PERL_ARGS_ASSERT_IS_UTF8_STRING_FLAGS;
assert(0 == (flags & ~(UTF8_DISALLOW_ILLEGAL_INTERCHANGE
|UTF8_DISALLOW_PERL_EXTENDED)));
+ if (len == 0) {
+ len = strlen((const char *)s);
+ }
+
if (flags == 0) {
return is_utf8_string(s, len);
}
return is_c9strict_utf8_string(s, len);
}
+ send = s + len;
while (x < send) {
STRLEN cur_len = isUTF8_CHAR_flags(x, send, flags);
if (UNLIKELY(! cur_len)) {
*/
PERL_STATIC_INLINE bool
-S_is_utf8_string_loclen_flags(const U8 *s, const STRLEN len, const U8 **ep, STRLEN *el, const U32 flags)
+S_is_utf8_string_loclen_flags(const U8 *s, STRLEN len, const U8 **ep, STRLEN *el, const U32 flags)
{
- const U8* const send = s + (len ? len : strlen((const char *)s));
+ const U8* send;
const U8* x = s;
STRLEN outlen = 0;
assert(0 == (flags & ~(UTF8_DISALLOW_ILLEGAL_INTERCHANGE
|UTF8_DISALLOW_PERL_EXTENDED)));
+ if (len == 0) {
+ len = strlen((const char *)s);
+ }
+
if (flags == 0) {
return is_utf8_string_loclen(s, len, ep, el);
}
return is_c9strict_utf8_string_loclen(s, len, ep, el);
}
+ send = s + len;
while (x < send) {
const STRLEN cur_len = isUTF8_CHAR_flags(x, send, flags);
if (UNLIKELY(! cur_len)) {
#endif
#ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE bool S_is_utf8_string_flags(const U8 *s, const STRLEN len, const U32 flags)
+PERL_STATIC_INLINE bool S_is_utf8_string_flags(const U8 *s, STRLEN len, const U32 flags)
__attribute__warn_unused_result__;
#define PERL_ARGS_ASSERT_IS_UTF8_STRING_FLAGS \
assert(s)
#define PERL_ARGS_ASSERT_IS_UTF8_STRING_LOC \
assert(s); assert(ep)
#endif
-/* PERL_CALLCONV bool is_utf8_string_loc_flags(const U8 *s, const STRLEN len, const U8 **ep, const U32 flags); */
+/* PERL_CALLCONV bool is_utf8_string_loc_flags(const U8 *s, STRLEN len, const U8 **ep, const U32 flags); */
#ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE bool Perl_is_utf8_string_loclen(const U8 *s, const STRLEN len, const U8 **ep, STRLEN *el);
+PERL_STATIC_INLINE bool Perl_is_utf8_string_loclen(const U8 *s, STRLEN len, const U8 **ep, STRLEN *el);
#define PERL_ARGS_ASSERT_IS_UTF8_STRING_LOCLEN \
assert(s)
#endif
#ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE bool S_is_utf8_string_loclen_flags(const U8 *s, const STRLEN len, const U8 **ep, STRLEN *el, const U32 flags);
+PERL_STATIC_INLINE bool S_is_utf8_string_loclen_flags(const U8 *s, STRLEN len, const U8 **ep, STRLEN *el, const U32 flags);
#define PERL_ARGS_ASSERT_IS_UTF8_STRING_LOCLEN_FLAGS \
assert(s)
#endif