Anothjer silly String question
daniel.vainsencher at gmail.com
Tue Nov 15 20:02:16 UTC 2005
There is no problem here, just put your space before the period, as in:
For which I, btw, get 32, which http://www.lookuptables.com/
corroborates is the ascii value for the space character :-)
> Bob.Cowdery at CGI-Europe.com wrote:
>> I'm trying to figure out not just a way to do various string
>> manipulations but the right way as it's pretty basic stuff. Apart from
>> taking substrings and concatenating them is there a way to remove
>> characters from a string.
>> e.g. I have a string '3.669' and I want to remove the '.'
>> In a workspace I can type '3.669' replaceAll: $. with: $ and then
>> print it and it works provided there is nothing after the second $.
>> However in a method if I put a dot after the last $ as a terminator it
>> takes it as a character and wants another dot for the terminator. I
>> tried it in a block and still can't get away without putting a dot
>> after the $. Is there some way to express this or am I barking up the
>> wrong tree again.
> If you try to inspect the result instead of printing it you will get a
> inspector in the result string.
> The you click on the second entry you will get that characters value eg.
> Then you can replace the $ with a Character value:30 and you get:
> '3.669' replaceAll: $. with: (Character value:30)
More information about the Squeak-dev