On 5/3/19 17:59, Craig Johnson wrote: > > Hi All, > > > > I was trying to figure an elegant way to slice strings (Python style), > and came up empty. > > > > What is the simplest way to copy characters between positions 4 and 8 > from a string in Pharo? > > > > Craig >
You can use: 'Strings are intuitive' copyFrom: 4 to: 8 which should give you: 'ings '. There is an excellent tutorial about Strings on [1]. [1] http://stephane.ducasse.free.fr/FreeBooks/ByExample/14%20-%20Chapter%2012%20-%20Strings.pdf If you share with us what are the results of your internet searchers to answer yourself while asking in this list and why they don't work for you, we can help you better (see [2], for a kind of updated classic on that). [2] http://www.catb.org/esr/faqs/smart-questions.html Cheers, Offray
