Count the number of spaces before the first character
Source:R/count_trailing_spaces.R
count_trailing_spaces.Rd
Count the number of spaces before the first character
Examples
check_empty_beautier_folder()
# 0
count_trailing_spaces("x")
#> [1] 0
# 1
count_trailing_spaces(" y")
#> [1] 1
# 2
count_trailing_spaces(" <")
#> [1] 2
# 0
count_trailing_spaces("")
#> [1] 0
# 1
count_trailing_spaces(" ")
#> [1] 1
# 2
count_trailing_spaces(" ")
#> [1] 2
check_empty_beautier_folder()