I have a string for example “my sample string@android”.I want to the string before the @ symbol
That means i don’t want the string after @ symbol
Please any one help me with some source code
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Just split the string and take the first part:
Then
splitted[0] = "sample string ",splitted[1] = "whatever"andsplitted[2] = "test".So if you always want the part before the
"@"you can write