count_trailing_spaces {beautier}R 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()

[Package beautier version 2.6.12 Index]