What is the method for separating the text ?
Eg. "A0000001 PERERA N SON"
In the above exapmle I want to seperate "A0000001" text from "A0000001 PERERA N SON" and asign that to a different variable.
What is the method for separating the text ?
Eg. "A0000001 PERERA N SON"
In the above exapmle I want to seperate "A0000001" text from "A0000001 PERERA N SON" and asign that to a different variable.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Blocked AccountRank #403 · 6.2K reputationPosted May 16, 2008, 3:31 AM EDT
You can do this by using this.
string value = "A0000001 PERERA N SON";
string value1 = value.Substring(0, value.IndexOf(" "));
Happy Coding!!
Dinusha Gamage67 reputationPosted May 16, 2008, 3:52 AM EDT
Thanks Manish !