Suppose you have a string separated by hypen("-").If you want only the portion which comes after hypen("-") then you have to write
public static String getID(String value)
{
return value.Split('-')[value.Split(' -').Length - 1].Trim();
}
public static String getID(String value)
{
return value.Split('-')[value.Split('
}
0 comments:
Post a Comment