String
半角空白削除の場合には、whitespaces、改行などの制御記号も取り除く場合にはNewlinesも追加する。 let myString = " \t\t Let's trim all the whitespace \n \t \n " let trimmedString = myString.trimmingCharacters(in: .whitespacesAndNewlines) print…
半角空白削除の場合には、whitespaces、改行などの制御記号も取り除く場合にはNewlinesも追加する。 let myString = " \t\t Let's trim all the whitespace \n \t \n " let trimmedString = myString.trimmingCharacters(in: .whitespacesAndNewlines) print…