I fetch Json from api.
"fields": {
"document": "some text: \n\n__textToRemove:__\ textToRemove \n\n__some text:__\ some text"
}
How I can remove part of string? I want to cut "textToRemove"
I fetch Json from api.
"fields": {
"document": "some text: \n\n__textToRemove:__\ textToRemove \n\n__some text:__\ some text"
}
How I can remove part of string? I want to cut "textToRemove"
You have to remove back slash or something else with the help of this type of code.
val dummyText = "Lorem Ipsum is\\ simply\\ dummy\\text of the\\ printing and
typesetting industry. Lorem Ipsum has been the\\ industry's";
val fields = dummyText.replaceAll("\\", ""); or dummyText.replace("\\","")
and then convert into JsonObject. I hope it will be helpful to you.