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
count-lines: func [ str /local sort-str ][ sort-str: sort join str "^/" 1 + subtract index? find/last sort-str "^/" index? find sort-str "^/" ]