Bugz
November 12th, 2008, 11:16 AM
Is there an easy way to get a substring of a string? I am calling a method that returns back an array of values that look similar to:
keys[0] = "All|All";
keys[1] = "Admin|Admin";
keys[2] = "Shop Floor|Shop Floor";
keys[3] = "Development|Development";
keys[4] = "Front Desk|Front Desk";
When I receive the results, I want to break out the results so that All|All becomes All and Admin|Admin becomes Admin. Is there an easy way to get rid of everything after the "|"?
keys[0] = "All|All";
keys[1] = "Admin|Admin";
keys[2] = "Shop Floor|Shop Floor";
keys[3] = "Development|Development";
keys[4] = "Front Desk|Front Desk";
When I receive the results, I want to break out the results so that All|All becomes All and Admin|Admin becomes Admin. Is there an easy way to get rid of everything after the "|"?