String replace

From Cuis CookBook
Revision as of 20:06, 4 May 2025 by Nmingott (talk | contribs) (importe material)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Problem. I have several file names ending with .zip.b64, I want to get rid of the .b64 part of the string.

Solution. Use the String >> copyReplaceAll: with: message.

'foo.bar.baz.b64' copyReplaceAll: '.b64' with: ''.        "=>  'foo.bar.baz' "

Dr. Nicola Mingotti made this pange on this page on 19-Sep-2021. Tested in Cuis5.0-4834.image.