Module konst::string[][src]

Expand description

const fn equivalents of str methods.

Re-exports

Deprecated

Modules

Reexports for 0.2.* patch releases, will be removed in 0.3.0

Macros

A const equivalent of std::str::from_utf8, usable *only in consts and statics.

Structs

Error returned by the from_utf8 function and macro when the input byte slice isn’t valid utf8.

Functions

Compares two Option<&'a str>, returning the ordering of left relative to right.

A const equivalent of str::cmp.

A const equivalent of str::contains , taking a &str parameter, searching in &left[from..].

A const equivalent of str::ends_with , taking a &str parameter.

Compares two Option<&'a str> for equality.

A const equivalent of &str equality comparison.

A const equivalent of str::find , taking a &str parameter, searching in &left[from..].

find_keeprust_1_55

Advances this up to the first instance of needle.

find_skiprust_1_55

Advances this past the first instance of needle.

from_utf8rust_1_55

A const equivalent of std::str::from_utf8, requires Rust 1.55 and the "rust_1_55" feature.

get_fromrust_1_55

A const equivalent of string.get(from..).

get_rangerust_1_55

A const equivalent of string.get(start..end).

get_up_torust_1_55

A const equivalent of string.get(..len).

A const equivalent of str::contains , taking a &str parameter, searching in &left[..=from] from the end.

A const equivalent of str::rfind , taking a &str parameter, searching in &left[..=from].

rfind_keeprust_1_55

Truncates this to the last instance of needle.

rfind_skiprust_1_55

Truncates this to before the last instance of needle.

split_atrust_1_55

A const equivalent of str::split_at

A const equivalent of str::starts_with , taking a &str parameter.

str_fromrust_1_55

A const equivalent of &string[start..].

str_rangerust_1_55

A const equivalent of &string[start..end].

str_up_torust_1_55

A const equivalent of &string[..len].

strip_prefixrust_1_55

A const subset of str::strip_prefix, this only takes a &str pattern.

strip_suffixrust_1_55

A const subset of str::strip_suffix, this only takes a &str pattern.

trimrust_1_55

A const subset of str::trim which only removes ascii whitespace.

trim_endrust_1_55

A const subset of str::trim_end which only removes ascii whitespace.

A const subset of str::trim_end_matches which only takes a &str pattern.

trim_matchesrust_1_55

A const subset of str::trim_matches which only takes a &str pattern.

trim_startrust_1_55

A const subset of str::trim_start which only removes ascii whitespace.

A const subset of str::trim_start_matches which only takes a &str pattern.