Function in stdx_string.h

x_smallstr_utf8_len

Counts UTF-8 codepoints in a small string.

X_STRING_API size_t x_smallstr_utf8_len(const XSmallstr *s);

Parameters

const XSmallstr *s
Destination small string.

Returns

Number of units written or measured (excluding the final terminator, if any).

Function in stdx_string.h

x_smallstr_utf8_substring

Copies a UTF-8 codepoint-range substring into a small string.

X_STRING_API int32_t x_smallstr_utf8_substring(
 const XSmallstr *s,
 size_t start_cp,
 size_t len_cp,
 XSmallstr *out
);

Parameters

const XSmallstr *s
Destination small string.
size_t start_cp
Starting UTF-8 codepoint offset (0-based).
size_t len_cp
Number of UTF-8 codepoints to copy or inspect.
XSmallstr *out
Parameter.

Returns

Function-specific integer result.

Function in stdx_string.h

x_smallstr_utf8_trim

Trims leading and trailing Unicode whitespace (by UTF-8 codepoints).

X_STRING_API void x_smallstr_utf8_trim(XSmallstr *s);

Parameters

XSmallstr *s
Destination small string.

Returns

Resulting view after the operation.

Function in stdx_string.h

x_smallstr_utf8_trim_left

Trims leading Unicode whitespace (by UTF-8 codepoints).

X_STRING_API void x_smallstr_utf8_trim_left(XSmallstr *s);

Parameters

XSmallstr *s
Destination small string.

Returns

Resulting view after the operation.

Function in stdx_string.h

x_smallstr_utf8_trim_right

Trims trailing Unicode whitespace (by UTF-8 codepoints).

X_STRING_API void x_smallstr_utf8_trim_right(XSmallstr *s);

Parameters

XSmallstr *s
Destination small string.

Returns

No return value.