Answers for "swift textfield trim special characters before database"

0

swift textfield trim special characters before database

public static string RemoveSpecialCharacters(string str)
    {
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < str.Length; i++)
        {
            if ((str[i] >= '0' && str[i] <= '9')
                || (str[i] >= 'A' && str[i] <= 'z'
                    || (str[i] == '.' || str[i] == '_')))
                {
                    sb.Append(str[i]);
                }
        }

        return sb.ToString();
    }
Posted by: Guest on June-10-2020

Code answers related to "swift textfield trim special characters before database"

Code answers related to "Swift"

Browse Popular Code Answers by Language