Lines Matching defs:lenp
2387 Converts a string C<"s"> of length C<*lenp> from UTF-8 into native byte encoding.
2389 updates C<*lenp> to contain the new length.
2390 Returns zero on failure (leaving C<"s"> unchanged) setting C<*lenp> to -1.
2393 having saved the value of C<*lenp> before the call, and subtracting the
2394 after-call value of C<*lenp> from it.
2402 Perl_utf8_to_bytes(pTHX_ U8 *s, STRLEN *lenp)
2410 if (is_utf8_invariant_string_loc(s, *lenp, (const U8 **) &first_variant)) {
2418 U8 * const send = s + *lenp;
2426 if (*lenp > 5 * PERL_WORDSIZE) {
2447 *lenp = ((STRLEN) -1);
2498 *lenp = ((STRLEN) -1);
2520 *lenp = ((STRLEN) -1);
2606 *lenp = ((STRLEN) -1);
2612 *lenp = d - save;
2620 Converts a potentially UTF-8 encoded string C<s> of length C<*lenp> into native
2629 C<*lenp> are unchanged, and the return value is the original C<s>.
2633 returned in C<*lenp>, updated. The new string is C<NUL>-terminated. The
2638 having saved the value of C<*lenp> before the call, and subtracting the
2639 after-call value of C<*lenp> from it.
2647 Perl_bytes_from_utf8(pTHX_ const U8 *s, STRLEN *lenp, bool *is_utf8p)
2652 return bytes_from_utf8_loc(s, lenp, is_utf8p, NULL);
2670 C<"s">. C<*lenp> is set to its length, not including the terminating C<NUL>.
2683 in a newly created C<NUL>-terminated string, and C<*lenp> is set to its length,
2685 original could not be converted, C<*lenp> will be 0, and the new string will
2690 string can be computed by having saved the value of C<*lenp> before the call,
2691 and subtracting the after-call value of C<*lenp> from it.
2699 Perl_bytes_from_utf8_loc(const U8 *s, STRLEN *lenp, bool *is_utf8p, const U8** first_unconverted)
2704 const U8 *send = s + *lenp;
2716 Newx(d, (*lenp) + 1, U8);
2750 *lenp = d - converted_start;
2753 Renew(converted_start, *lenp + 1, U8);
2761 Converts a string C<s> of length C<*lenp> bytes from the native encoding into
2763 Returns a pointer to the newly-created string, and sets C<*lenp> to
2768 having saved the value of C<*lenp> before the call, and subtracting it from the
2769 after-call value of C<*lenp>.
2781 Perl_bytes_to_utf8(pTHX_ const U8 *s, STRLEN *lenp)
2783 const U8 * const send = s + (*lenp);
2791 Newx(d, (*lenp) + variant_under_utf8_count(s, send) + 1, U8);
2800 *lenp = d-dst;
3001 Perl__to_upper_title_latin1(pTHX_ const U8 c, U8* p, STRLEN *lenp,
3019 *lenp = 1;
3040 *lenp = 2;
3053 *lenp = 2;
3082 * 'lenp' will be set to the length in bytes of the string of changed characters
3086 #define CALL_UPPER_CASE(uv, s, d, lenp) \
3087 _to_utf8_case(uv, s, d, lenp, PL_utf8_toupper, \
3092 #define CALL_TITLE_CASE(uv, s, d, lenp) \
3093 _to_utf8_case(uv, s, d, lenp, PL_utf8_totitle, \
3098 #define CALL_LOWER_CASE(uv, s, d, lenp) \
3099 _to_utf8_case(uv, s, d, lenp, PL_utf8_tolower, \
3109 #define CALL_FOLD_CASE(uv, s, d, lenp, specials) \
3111 ? _to_utf8_case(uv, s, d, lenp, PL_utf8_tofold, \
3116 : _to_utf8_case(uv, s, d, lenp, PL_utf8_tosimplefold, \
3122 Perl_to_uni_upper(pTHX_ UV c, U8* p, STRLEN *lenp)
3125 * version and store that in UTF-8 in <p> and its length in bytes in <lenp>.
3135 return _to_upper_title_latin1((U8) c, p, lenp, 'S');
3138 return CALL_UPPER_CASE(c, NULL, p, lenp);
3142 Perl_to_uni_title(pTHX_ UV c, U8* p, STRLEN *lenp)
3147 return _to_upper_title_latin1((U8) c, p, lenp, 's');
3150 return CALL_TITLE_CASE(c, NULL, p, lenp);
3154 S_to_lower_latin1(const U8 c, U8* p, STRLEN *lenp, const char dummy)
3167 *lenp = 1;
3174 *lenp = 2;
3181 Perl_to_uni_lower(pTHX_ UV c, U8* p, STRLEN *lenp)
3186 return to_lower_latin1((U8) c, p, lenp, 0 /* 0 is a dummy arg */ );
3189 return CALL_LOWER_CASE(c, NULL, p, lenp);
3193 Perl__to_fold_latin1(const U8 c, U8* p, STRLEN *lenp, const unsigned int flags)
3221 *lenp = 2 * STRLENs(LATIN_SMALL_LETTER_LONG_S_UTF8);
3223 p, *lenp, U8);
3229 *lenp = 2;
3241 *lenp = 1;
3246 *lenp = 2;
3253 Perl__to_uni_fold_flags(pTHX_ UV c, U8* p, STRLEN *lenp, U8 flags)
3279 return _to_fold_latin1((U8) c, p, lenp,
3285 return CALL_FOLD_CASE(c, NULL, p, lenp, flags & FOLD_FLAGS_FULL);
3294 p, lenp, flags);
3491 U8* ustrp, STRLEN *lenp,
3504 * On return 'ustrp' points to '*lenp' UTF-8 encoded bytes representing the
3524 *lenp = UTF8SKIP(p);
3527 Copy(p, ustrp, *lenp, U8);
3541 *lenp = d - ustrp;
3617 U8* const ustrp, STRLEN *lenp)
3630 * lenp points to the length of <ustrp> */
3645 U8* e = ustrp + *lenp;
3661 original = valid_utf8_to_uvchr(p, lenp);
3670 Copy(p, ustrp, *lenp, char);
3676 U8 * ustrp, STRLEN *lenp)
3682 * contain *lenp bytes
3692 *lenp = 2;
3701 *lenp = 1;
3711 U8 * ustrp, STRLEN *lenp)
3717 * contain *lenp bytes */
3733 *lenp = 1;
3751 return turkic_fc(p0, e, ustrp, lenp);
3756 U8 * ustrp, STRLEN *lenp)
3762 * ustrp will contain *lenp bytes
3772 *lenp = 2;
3779 *lenp = 1;
3825 UV ret = turkic(p, e, ustrp, lenp); \
3840 return L1_func(*p, ustrp, lenp, L1_func_extra_param); \
3849 return L1_func(c, ustrp, lenp, L1_func_extra_param); \
3860 result = change_macro(result, p, ustrp, lenp); \
3863 result = check_locale_boundary_crossing(p, result, ustrp, lenp); \
3871 *lenp = 1; \
3876 *lenp = 2; \
3889 STRLEN *lenp,
3913 STRLEN *lenp,
3935 STRLEN *lenp,
3961 STRLEN *lenp,
3977 result = CALL_FOLD_CASE(result, p, ustrp, lenp, flags & FOLD_FLAGS_FULL);
4025 return check_locale_boundary_crossing(p, result, ustrp, lenp);
4040 U8* send = ustrp + *lenp;
4044 original = valid_utf8_to_uvchr(p, lenp);
4066 Copy(p, ustrp, *lenp, char);
4080 *lenp = 1;
4085 *lenp = 2;
4097 *lenp = 2 * STRLENs(LATIN_SMALL_LETTER_LONG_S_UTF8);
4099 ustrp, *lenp, U8);
4106 *lenp = STRLENs(LATIN_SMALL_LIGATURE_ST_UTF8);
4107 Copy(LATIN_SMALL_LIGATURE_ST_UTF8, ustrp, *lenp, U8);
4115 *lenp = STRLENs(LATIN_SMALL_LETTER_DOTLESS_I_UTF8);
4116 Copy(LATIN_SMALL_LETTER_DOTLESS_I_UTF8, ustrp, *lenp, U8);