Given a string string, what is the fastest/most-efficient way to count lines therein? Will accept best answers for any flavour of Rebol. I\'ve been working unde
string
remove-each can be fast as it is native
s: "1^/2^/3" a: length? s print a - length? remove-each v s [v = #"^/"] ; >> 2
or as a function
>> f: func [s] [print [(length? s) - (length? remove-each v s [v = #"^/"])]] >> f "1^/2^/3" == 2