You need to sign in to do that
Don't have an account?
bprakash
can any tell me how to find first space in a string(means position of space in string)
MPS 00:E0:81:C2:DA:55 [days] [r]
this is the string i want the first space length so that i can use in my apex code.This all iam doing in a class,i had find a function on fromula fields but it has no use in apex.
can any tell me how to find first space in a string(means position of space in string)
Thanks
Bhanu
Integer sIndexValue = ord.Email_Address_Client__c.indexOf('@');
String sEmail = ord.Email_Address_Client__c.subString(0, sIndexValue);
In similar way u can use it for space
All Answers
Integer sIndexValue = ord.Email_Address_Client__c.indexOf('@');
String sEmail = ord.Email_Address_Client__c.subString(0, sIndexValue);
In similar way u can use it for space
iam using this in a email services class,but the thing is that i had a space after MPS iwant the position for that,but everytime it is showing as 0,so how exactly i can get this position of space every time.
for example
this is my string 'NEW ADD'
in this i need the position between NEW & ADD.
Can this is possible ?
Please hepl me out of this.
Thanks
Bhanu
string str = 'NEW ADD'; integer location = str.IndexOf(' ');
i got it,i had given any space between ' '
that is the problem,
Thanks for the help,Have a great weekend.
Thanks
Bhanu
Thanks
steve,JP clark
have a great weekend