HomeManualTopicsTypesSymbols

std::without_suffix

removes a specific expression at the end of a string

Parameters

None

Results

None

Description

If the string specified as the first argument ends with the expression specified as the second argument, the matching suffix of the string is removed and the resulting string is returned.

Otherwise the string is returned without alteration.

Topic

Strings

See also

std::without_prefix removes a specific expression at the start of a string
std::has_suffix returns *true* if the second argument is a suffix of the first argument
std::has_prefix returns *true* if the second argument is a prefix of the first argument
std::before returns the substring before the specified expression
std::truncate_until returns the substring behind the specified expression

Implemented by

std_types::string returns the string without the specified suffix