“Как разделить строку на Java Android” Ответ

Android Как разделить строку

String currentString = "Fruit: they taste good";
String[] separated = currentString.split(":");
separated[0]; // this will contain "Fruit"
separated[1]; // this will contain " they taste good"
Fine Flatworm

Как разделить строку на Java Android

String currentString = "Custom Section";
String[] splitarray = currentString.split(" ");
separated[0]; // this will contain "Custom"
separated[1]; // this will contain "Custom"

//assign to string variable
 for (int i = 2; i < array.length; i++) {
   secondName = secondName + " " + array[i];
 }
KushalCodes

Ответы похожие на “Как разделить строку на Java Android”

Вопросы похожие на “Как разделить строку на Java Android”

Больше похожих ответов на “Как разделить строку на Java Android” по Java

Смотреть популярные ответы по языку

Смотреть другие языки программирования