Ok so for smalltalk specific code I'll use cr
The reason I needed to know is that I need to make an HMAC-SHA256 hash of a multiline string and submit it to a third party for processing. In their java and python examples they concatenated in a \n to form the multiple line string. At the time I asked, what I was calculating was incorrect so as part of trying to figure out where I had the calculation wrong I wanted to make sure I was using the proper substitute
Thanks again for the help
Paul
On Aug 2, 2009, at 5:51 PM, Bert Freudenberg bert@freudenbergs.de wrote:
On 02.08.2009, at 23:20, Paul DeBruicker wrote:
So 'Character cr asciiValue' is 13 'Character lf asciiValue' is 10
and ascii value of the \n character in Python is
ord('\n')
10
So I want to use 'String lf' inplace of a \n in Python during string concatenation.
#lf is rarely used in Squeak code. Typically we use #cr. E.g., if you want a line break while writing to the Transcript you would send #cr. Same if you want a line break in a text file. Rather than switching between #cr, #lf, and #crlf depending on the platform being a Mac, Unix, or Windows, we only use #cr and rather set the stream to the right line end conversion method.
- Bert -
Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners