Snippets tagged “split”
13 snippets use this tag.
- Android Split stringJava
To split a string in Android, you can use the split() method of the String class.
- How do I get the file name from a String containing the Absolute file path?Java
To get the file name from a String containing the absolute file path in Java, you can use the following methods:
- How to Convert a Comma-Separated String into ArrayJavaScript
Read this tutorial and learn information about the JavaScript built-in split() method which is called for converting a comma-separated string in an array.
- How to convert comma-separated String to List?Java
To convert a comma-separated String to a List in Java, you can use the String.split() method to split the string into an array of substrings, and then use the Arrays.asList() method to create a list from that array.
- How to Count String Occurrence in StringJavaScript
Read this tutorial and learn several useful methods that are used to count the string occurrence in a string. Choose one of the working methods for you.
- How to Get File Extensions with JavaScriptJavaScript
Read this tutorial and learn several useful, fast and simple one-line and extended solutions of extracting file extensions with the help of JavaScript.
- How to Split a String Breaking at a Particular Character in JavaScriptJavaScript
Read this tutorial and find two easy and fast methods of splitting the string breaking at a particular character in JavaScript. Also, find and try examples.
- How to Split a String in JavaJava
Learn the ways to split a string in Java. The most common way is using the String.split () method, also see how to use StringTokenizer and Pattern.compile ().
- How to split a string with any whitespace chars as delimitersJava
In Java, you can use the split() method of the String class to split a string based on a regular expression.
- Split Java String by New LineJava
To split a string in Java by new line, you can use the split method of the String class and pass it the regular expression "\n" or "\r\n", depending on the platform you are running on.
- Split string on whitespace in PythonPython
You can use the split() method to split a string on whitespace in Python.
- string to string array conversion in javaJava
There are several ways to convert a string to a string array in Java. Here are a few options:
- Whitespace Matching Regex - JavaJava
In Java, you can use the following regular expression to match any amount of whitespace: