count_trailing_spaces: Count the number of spaces before the first character

View source: R/count_trailing_spaces.R

count_trailing_spacesR Documentation

Count the number of spaces before the first character

Description

Count the number of spaces before the first character

Usage

count_trailing_spaces(line)

Arguments

line

line of text

Value

the number of spaces before the first character

Author(s)

Richèl J.C. Bilderbeek

Examples

check_empty_beautier_folder()

# 0
count_trailing_spaces("x")
# 1
count_trailing_spaces(" y")
# 2
count_trailing_spaces("  <")
# 0
count_trailing_spaces("")
# 1
count_trailing_spaces(" ")
# 2
count_trailing_spaces("  ")

check_empty_beautier_folder()

beautier documentation built on Nov. 2, 2023, 5:08 p.m.