Raku's string split routine accepts a scalar as well as a list for its delimiter.
my Str $str = 'This string,has commas,and spaces';
my @delimiters of Str = [' ', ','];
my @array of Str = $str.split(@delimiters);
say @array.perl;
Which gives you:
Array[Str].new("This", "string", "has", "commas", "and", "spaces")
Other languages might require you to write a regular expression if you need to split a string on multiple delimiters at the same time.
Page Updates |
---|
RetroPie Arcade |
Customize New Linux Install |
Cisco CCNA Study :: Home Lab Notes |
PostgreSQL Backup Script |
Generate new Factorio map |
Recent Articles |
---|
Debug a Linux Kernel in QEMU |
Install xfce4 on Debian |
Console Blackjack in Perl |
Selenium::WebDriver::Error::UnknownError |
Game of Life in C++ using the SDL2 |
Copyright © 2005 - 2022
GregDonald.com · Contact · Nautical War · CRM12
All Rights Reserved