|
Re: Re: translateFrom:to:table:: msg#00220lang.smalltalk.squeak.beginners
That works for lots of methods. But for some methods there are no decent comments or examples. This is what I get from "Senders of translateFrom:to:table:" translateWith: table "translate the characters in the string by the given table, in place" ^ self translateFrom: 1 to: self size table: table I don't find see anything called "references". I cannot find a single example of what a table arguments should look like. Here's a simple example of what I want to do: myString := 'ACGTACGT'. myFixedString := myString translateFrom: 1 to; (myString size) table: table. Where table would be something like a hash: A => 5, G => 6, C => 7, T => 8. in Perl, I would write: perl -pe 'tr/AGCT/5678/' <return> on the command line and then paste in the string and perl would return the translated string. Thanks for your help. Tom Keller
On 7/28/06, Klaus D. Witzel <klaus.witzel@xxxxxxxxx> wrote: On Fri, 28 Jul 2006 20:49:13 +0200, Mathieu wrote: -- Tom "Ecrasez l'Infame!" -- Voltaire _______________________________________________ Beginners mailing list Beginners@xxxxxxxxxxxxxxxxxxxxxxxxxx http://lists.squeakfoundation.org/mailman/listinfo/beginners
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Books, Damien Cassou |
|---|---|
| Next by Date: | Re: Re: translateFrom:to:table:, Klaus D. Witzel |
| Previous by Thread: | Re: translateFrom:to:table:, Klaus D. Witzel |
| Next by Thread: | Re: Re: translateFrom:to:table:, Klaus D. Witzel |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |