Question : split a string into an array using split method
Answered by : oldfashioned-osprey-dsofpothed9u
function splitify(str) { // Add your code below this line return str.split(/\W/); // Add your code above this line
}
splitify("Hello World,I-am code");
Source : https://forum.freecodecamp.org/t/freecodecamp-challenge-guide-split-a-string-into-an-array-using-the-split-method/18305 | Last Update : Fri, 20 May 22
Question : Split string into a string array
Answered by : purple-team
public class MyClass { public static void main(String args[]) { String data = "1,2,3,,5,6,,"; String[] split = data.split(",", -1); for (int i=0; i<split.length; i++) System.out.println(split[i]); System.out.println("Done"); }
}
Source : https://www.delftstack.com/howto/java/how-to-split-string-to-array-in-java/ | Last Update : Tue, 01 Mar 22
Question : Separate A String Into Array Elements
Answered by : eric-tam
$web = "https://www.medium.com/";
$web_array = explode(".", $web);
print_r($web_array);
Source : | Last Update : Sun, 10 Jul 22