Xbasic

LINE_COUNT Function

Syntax

Count as N = Line_Count(C Source)

Arguments

Source

A CR-LF delimited character string list.

Description

Counts the number of lines in a string.

Discussion

LINE_COUNT() returns the number of lines in a CR-LF delimited character string list.

Example

dim cs as C
cs = form_objects_get("EditForm")
line_count(cs)   -> 65.000000
line_count("")   -> 0.000000
line_count("abc" + crlf() )   ->   1.000000
line_count("abc" + crlf() + "def")-> 2.000000

See Also