I am trying to remove first 0 from integer part of the string.
IF "CATI-09100"
has 0
first in interger
part remove it and string would be "CATI-9100"
. Otherwise no change. I tried using substring
. But I need better and efficient way to do it. Also, "CATI-"
will be in every string. Any hint will do.
I was thinking on below lines :
strICTOID = Convert.ToString(drData.GetValue(0).Equals(System.DBNull.Value) ? string.Empty : drData.GetValue(0).ToString().Trim());
if (strICTOID.Length > 0)
{
indexICTO = strICTOID.IndexOf("-");
}