[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] substring function and bounds checks
From: |
John Cowan |
Subject: |
Re: [Chicken-hackers] substring function and bounds checks |
Date: |
Thu, 7 Feb 2013 20:45:52 -0500 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
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, address@hidden
six, five, six, five, six, five, six, five, and six.
--blazoning the U.S. flag http://www.ccil.org/~cowan
- Re: [Chicken-hackers] substring function and bounds checks, (continued)
- Re: [Chicken-hackers] substring function and bounds checks, Jim Ursetto, 2013/02/05
- Re: [Chicken-hackers] substring function and bounds checks, Peter Bex, 2013/02/06
- Re: [Chicken-hackers] substring function and bounds checks, Michele La Monaca, 2013/02/06
- Re: [Chicken-hackers] substring function and bounds checks, John Cowan, 2013/02/06
- Re: [Chicken-hackers] substring function and bounds checks, Peter Bex, 2013/02/06
- Re: [Chicken-hackers] substring function and bounds checks, Alex Shinn, 2013/02/06
- Re: [Chicken-hackers] substring function and bounds checks, Michele La Monaca, 2013/02/07
- Re: [Chicken-hackers] substring function and bounds checks, Alex Shinn, 2013/02/07
- Re: [Chicken-hackers] substring function and bounds checks, Michele La Monaca, 2013/02/07
- Re: [Chicken-hackers] substring function and bounds checks, Alex Shinn, 2013/02/07
- Re: [Chicken-hackers] substring function and bounds checks,
John Cowan <=
- Re: [Chicken-hackers] substring function and bounds checks, Alex Shinn, 2013/02/07
- Re: [Chicken-hackers] substring function and bounds checks, John Cowan, 2013/02/07
- Re: [Chicken-hackers] substring function and bounds checks, Alex Shinn, 2013/02/07
- Re: [Chicken-hackers] substring function and bounds checks, John Cowan, 2013/02/07
- Re: [Chicken-hackers] substring function and bounds checks, Alex Shinn, 2013/02/07
- Re: [Chicken-hackers] substring function and bounds checks, Michele La Monaca, 2013/02/08
- Re: [Chicken-hackers] substring function and bounds checks, Alex Shinn, 2013/02/08
- Re: [Chicken-hackers] substring function and bounds checks, Michele La Monaca, 2013/02/08
- Re: [Chicken-hackers] substring function and bounds checks, Felix, 2013/02/08