Currently i am working in simple android app, I have tried to range of string in iphone, its works, but i didn't know this in Android app? In iphone:
result = "mobile - check balance | rate: 0.036"
if ( [result rangeOfString:@"rate:"].location != NSNotFound)
{
}
How to convert this in Android, please help me
Have you tried something like result = "mobile- check balance | rate: 0.036"
if( result.indexOf("rate")!=-1)
{}
I've been using objective-c recently too, and I pulled this from here
try this
String strVowels = "mobile - check balance | rate: 0.036";
if (strVowels.contains("rate:") == true) {
// String contains IOU sub-string!
Log.i("mylog", "this word is in string.");
} else {
Log.i("mylog", "this word is not in string.");
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With