Alex Shinn scripsit:

> Can you provide a real-world example where you'd want to use this
> function?

I used to use it all the time in Perl, where it is the normal behavior
of the substr() function, to pull a fixed-width field out of a line of
text without having to worry about short lines.  If the field was at the
end of the line, the result was short; if the field was not present, the
result was the empty string.  In some contexts, I would then concatenate
spaces to it and truncate the result to the desired width.

-- 
Barry thirteen gules and argent on a canton azure           John Cowan
fifty mullets of five points of the second,             [email protected]
six, five, six, five, six, five, six, five, and six.
        --blazoning the U.S. flag           http://www.ccil.org/~cowan

_______________________________________________
Chicken-hackers mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/chicken-hackers

Reply via email to