Skip to contents

Split the string into individual characters and complete the character vector to the maximum length.

Usage

mi_split_str(str, pad_len)

Arguments

str

The string to be splited.

pad_len

The length of longest ID, i.e. the maxlength.

Value

Splited character vector.

Examples

string_test <- "Good Job"
length <- 15
mi_split_str(string_test, length)
#>  pos1  pos2  pos3  pos4  pos5  pos6  pos7  pos8  pos9 pos10 pos11 pos12 pos13 
#>   "G"   "o"   "o"   "d"   " "   "J"   "o"   "b"   "*"   "*"   "*"   "*"   "*" 
#> pos14 pos15 
#>   "*"   "*"