String utils

re_find(regex, s, flags=0)
re_test(regex, s, flags=0)
re_iter(regex, s, flags=0)
re_all(regex, s, flags=0)
re_finder(regex, flags=0)

Returns a function that calls re_find() for it’s sole argument. It’s main purpose is quickly constructing mapper functions for map() and friends.

See also Extended predicate/mapper semantics.

re_tester(regex, flags=0)

Returns a function that calls re_test() for it’s sole argument. Aimed at quick construction of predicates for use in filter() and friends.

See also Extended predicate/mapper semantics.

str_join([sep="", ]seq)

Joins sequence by sep. Same as sep.join(seq), but forcefully converts all elements to separator type, str by default.

See also joining().

cut_prefix(s, prefix)

Cuts prefix from given string if it’s present.

cut_suffix(s, suffix)

Cuts suffix from given string if it’s present.

Previous topic

Flow

Next topic

Calculation

This Page