I want to split string without using split . can anybody solve my problem I am tried but I cannot find the exact logic.
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
You cant split with out using split(). Your only other option is to get the strings char indexes and and get sub strings.
I'm going to assume that this is homework, so I will only give snippets as hints:
Finding indices of all occurrences of a given substring
Here's an example of using
indexOf
with thefromIndex
parameter to find all occurrences of a substring within a larger string:String API links
int indexOf(String, int fromIndex)
Related questions
Extracting substrings at given indices out of a string
This snippet extracts
substring
at given indices out of a string and puts them into aList<String>
:Some key ideas:
String API links
String substring(int beginIndex, int endIndex)
beginIndex
and extends to the character at indexendIndex - 1
.Related questions