Skip to contents

Count the number of lines in a string

Usage

count_lines(string)

Arguments

string

A string

Value

output Integer supplying the number of lines in a string

Examples

count_lines("foo\nbar")
#> [1] 2