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();
}
Also in Swift:
- swift pop to specific view controller
- ShareSheet: UIViewControllerRepresentable swiftui
- swift change background color
- number of characters in a string swift
- swipe left to go back iphone swift
- dequeueReusableCellWithIdentifier returns nil
- how to set the font of text in swiftui
- swift
- loop backwards swift
- register page
- show back button in navbar swift
- rtl ios swift
- add textfield in swiftui
- check when webview finish loading swift
- add border to button swiftui
- ios rounded button
- go to view controller programmatically swift
- add navigation bar button swiftui
- how to set the center in view in swift
- swift get last element of array
- rounded ios button
- swift change navigation bar color
- add to beginning of array swift
- fnb swift code