[][src]Module voca_rs::manipulate

Manipulate with the subject.

Functions

expand_spaces

Returns a copy of subject expands spaces using the tab characters.

expand_tabs

Returns a copy of subject expands the tab characters using spaces.

insert

Inserts into subject a string to_insert at specified position.

latinise

Latinises the subject by removing diacritic characters.

pad

Pads subject to a new length.

pad_left

Pads subject from left to a new length.

pad_right

Pads subject from right to a new length.

repeat

Repeats the subject number of times.

replace

Replaces the matches of pattern with replacement.

replace_all

Replaces all matches of pattern with replacement.

reverse

Reverses the subject.

reverse_grapheme

Reverses the subject taking care of surrogate pairs and combining marks.

slugify

Slugifies the subject. Cleans the subject by replacing diacritics with corresponding latin characters.

splice

Changes subject by deleting delete_count of characters starting at position start. Places a new string to_add instead of deleted characters.

tr

Translates characters or replaces substrings in subject.

trim

Removes whitespaces from left and right sides of the subject.

trim_left

Removes whitespaces from the left side of the subject.

trim_right

Removes whitespaces from the right side of the subject.

word_wrap

Wraps subject to a given number of characters using a string break character.

zfill

Pads subject from left with zeros to a new length.