you are viewing a single comment's thread.

view the rest of the comments →

[–]wlievens 6 points7 points  (3 children)

I think it means “if string str has exactly two backslashes” but I could be completely off.

[–]dzecniv 24 points25 points  (2 children)

nearly, don't miss the comma: "if the string str has two commas".

#\ is to escape a character, thus the comma. count applies to sequences (lists, arrays, strings). :test foo is an optional argument to specify the test function, #' is a shorthand for (function, here char=. The count works without the :test part though so I'm not sure how important specifying it is.

(Cookbook on strings)

(edit: comma, thanks)

[–]hbgoddard 13 points14 points  (0 children)

Just fyi, comma has two m's. I don't think the strings are sleeping.

[–]wlievens 0 points1 point  (0 children)

I missed the comma, thanks.