Function reference
-
str_detect()
str_detect_starts_with()
str_detect_ends_with()
chr_detect_any()
chr_detect_all()
- Detect the presence of a pattern in a string
-
str_extract_first()
str_extract_all()
str_extract_nth()
str_extract_last()
chr_extract_all()
- Extract complete matches from strings
-
str_locate_first()
str_locate_all()
str_locate_nth()
str_locate_last()
- Locate pattern matches in strings
-
str_replace_first()
str_replace_all()
str_replace_nth()
str_replace_last()
- Replace parts of a string with new text.
-
str_remove_first()
str_remove_all()
str_remove_nth()
str_remove_last()
- Remove Patterns from Strings
-
str_split_all()
str_split_first()
str_split_nth()
str_split_last()
chr_split_all()
- Split strings by a pattern
-
chr_which()
- Find matching indices in character vector
-
chr_subset()
- Get matching elements
-
chr_count_matches()
- Count matching indices in character vector
-
str_concat()
- Concatenate strings
-
str_glue()
- Evaluate R code within strings
-
chr_collapse()
- Collapse a character vector to a single string
Character-based transformation
Functions for cleaning and transforming strings with respect to characters.
-
str_length()
str_width()
- Get the length or width of strings
-
str_trim()
str_squish()
- Remove trailing and leading whitespace
-
str_truncate()
- Shorten a string to a specified size
-
str_repeat()
- Repeat character sequences
-
str_pad()
- Pad a string to a minimum length
-
str_indent()
- Add characters to the ends of strings
-
str_to_upper_case()
str_to_lower_case()
str_to_snake_case()
str_to_camel_case()
- Convert strings to different cases
-
str_wrap()
- Wrap character strings to format as paragraphs
-
chr_sort()
chr_order()
chr_rank()
- Re-organise a character vector
-
chr_unique()
- Remove duplicated strings