Compute needsep only once. Pass correct arg to chars_in_text.
Attach a file by drag & drop or click to upload