C1Awk Reference > C1Awk Properties > FS Property |
Returns or sets the characters to be used as field separators.
[form!]C1Awk.FS[ = value As String ]
Each occurrence of any of the characters in the FS string marks the beginning of a new field. The only exception is that repeated spaces are equivalent to a single space.
When this property is changed, the current string is automatically re-parsed.
For example:
Example Title |
Copy Code
|
---|---|
awk = "This is a string|||with some pipes in it" awk.FS = " " debug.print awk.NF, "["; awk.F(NF); "]" 8 [it] awk.FS = "|" debug.print awk.NF; "["; awk.F(NF); "]" 4 [with some pipes in it] awk.FS = "| " debug.print awk.NF; "["; awk.F(NF); "]" 11 [it] |
String