Crate const_str

source ·
Expand description

Compile-time string operations

MSRV: Rust 1.64.0

Macros

Concatenates values into a string slice.
Concatenates values into a byte slice.
Returns true if the given pattern matches a sub-slice of this string slice.
Converts a string slice to a specified case. Non-ascii characters are not affected.
convert_caseproc or case
Converts a string literal to a specified case.
Converts a string slice to &CStr.
Encode a string slice with a specified encoding.
Encode a string slice with a specified encoding and append a nul character.
Returns true if the given pattern matches a suffix of this string slice.
Checks that two (string) slices are an ASCII case-insensitive match.
Checks that two strings are equal.
formatproc
Creates a string slice using interpolation of const expressions.
Converts a byte string to a string slice
Converts hexadecimal string slices to a byte array.
Converts a string slice to an IP address.
Checks if all characters in this (string) slice are within the ASCII range.
Parse a value from a string slice.
Converts a string slice to *const c_char.
Asserts that the string literal matches the pattern.
Creates a new string slice by repeating a string slice n times.
Replaces all matches of a pattern with another string slice.
Returns an array of substrings of a string slice, separated by characters matched by a pattern.
Returns true if the given pattern matches a prefix of this string slice.
Converts a string slice or a byte string to a byte array.
Converts a string slice into an array of its characters.
Converts a value to a string slice.
Returns a compile-time verified header name string literal.
Returns a compile-time verified regex string literal.