stringi icon indicating copy to clipboard operation
stringi copied to clipboard

stri_split - add `from_last` parameter

Open bartektartanus opened this issue 11 years ago • 0 comments

Add logical backwards parameter to split functions which will work when n_max != -1. If true then splitting is done from the end of a string.

stri_split_fixed("ala ma kota"," ") [[1]] [1] "ala" "ma" "kota"

stri_split_fixed("ala ma kota"," ",n=2) [[1]] [1] "ala" "ma kota"

stri_split_fixed("ala ma kota"," ",n=2, backwards=TRUE) [[1]] [1] "ala ma" "kota"

bartektartanus avatar Aug 23 '14 23:08 bartektartanus