All functions

all_equal()

An alternative version of base::all.equal().

before_last_dot() str_before_last_dot()

Get the part of a string before the last period.

can_be_numeric() str_can_be_numeric()

Check if a string could be considered as numeric.

create_dir()

Create directories if they don't already exist

str_extract_currencies() extract_currencies() str_nth_currency() nth_currency() str_first_currency() first_currency() str_last_currency() last_currency()

Get the currencies of numbers within a string.

extend_char_vec() str_extend_char_vec()

Pad a character vector with empty strings.

extract_non_numerics() str_extract_non_numerics() nth_non_numeric() str_nth_non_numeric() first_non_numeric() str_first_non_numeric() last_non_numeric() str_last_non_numeric()

Extract non-numbers from a string.

extract_numbers() str_extract_numbers() nth_number() str_nth_number() first_number() str_first_number() last_number() str_last_number()

Extract numbers from a string.

filesstrings filesstrings-package

filesstrings: handy file and string manipulation

group_close()

Group together close adjacent elements of a vector.

locate_braces() str_locate_braces()

Locate the braces in a string.

match_arg() str_match_arg()

Argument Matching

move_files() file.move()

Move files around.

nice_file_nums()

Make file numbers comply with alphabetical order

nth_number_after_mth() str_nth_number_after_mth() nth_number_after_first() nth_number_after_last() first_number_after_mth() last_number_after_mth() first_number_after_first() first_number_after_last() last_number_after_first() last_number_after_last() str_nth_number_after_first() str_nth_number_after_last() str_first_number_after_mth() str_last_number_after_mth() str_first_number_after_first() str_first_number_after_last() str_last_number_after_first() str_last_number_after_last()

Find the nth number after the mth occurrence of a pattern.

nth_number_before_mth() str_nth_number_before_mth() nth_number_before_first() nth_number_before_last() first_number_before_mth() last_number_before_mth() first_number_before_first() first_number_before_last() last_number_before_first() last_number_before_last() str_nth_number_before_first() str_nth_number_before_last() str_first_number_before_mth() str_last_number_before_mth() str_first_number_before_first() str_first_number_before_last() str_last_number_before_first() str_last_number_before_last()

Find the nth number before the mth occurrence of a pattern.

put_in_pos() str_put_in_pos()

Put specified strings in specified positions in an otherwise empty character vector.

remove_dir() dir.remove()

Remove directories

remove_filename_spaces()

Remove spaces in file names

rename_with_nums()

Replace file names with numbers

str_after_nth() after_nth() str_after_first() after_first() str_after_last() after_last()

Text after the nth occurrence of pattern.

str_before_nth() before_nth() str_before_first() before_first() str_before_last() before_last()

Text before the nth occurrence of pattern.

str_elem() elem()

Extract a single character from a string, using its index.

str_elems() elems()

Extract several single elements from a string.

str_give_ext() give_ext()

Ensure a file name has the intended extension.

str_locate_nth() locate_nth() str_locate_first() locate_first() str_locate_last() locate_last()

Get the indices of the \(n\)th instance of a pattern.

str_nice_nums() nice_nums() str_alphord_nums() alphord_nums()

Make string numbers comply with alphabetical order.

str_paste_elems() paste_elems()

Extract bits of a string and paste them together.

str_remove_quoted() remove_quoted()

Remove the quoted parts of a string.

str_singleize() singleize()

Remove back-to-back duplicates of a pattern in a string.

str_split_by_nums() split_by_nums() split_by_numbers() str_split_by_numbers()

Split a string by its numeric characters.

str_split_camel_case() split_camel_case()

Split a string based on CamelCase

str_to_vec() to_vec()

Convert a string to a vector of characters

str_trim_anything() trim_anything()

Trim something other than whitespace.

unitize_dirs()

Put files with the same unit measurements into directories