回答編集履歴
2
リンク切れの編集
answer
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
[UITextField](https://developer.apple.com/documentation/uikit/uitextfield) の `text` に入力された文字列が入ってきます。それが空文字かどうかは [isEmpty](https://developer.apple.com/documentation/swift/string/1539462-isempty) で判定できます。
|
2
2
|
|
3
|
-
空白の除去には、 [trimmingCharacters(in:)](https://developer.apple.com/documentation/swift/
|
3
|
+
空白の除去には、 [trimmingCharacters(in:)](https://developer.apple.com/documentation/swift/stringprotocol/2923360-trimmingcharacters) が使えそうです。
|
4
4
|
空白を表すパラメータは [whitespaces](https://developer.apple.com/documentation/foundation/characterset/1779930-whitespaces) とあります。
|
1
空白の除去について追記
answer
CHANGED
@@ -1,1 +1,4 @@
|
|
1
|
-
[UITextField](https://developer.apple.com/documentation/uikit/uitextfield) の `text` に入力された文字列が入ってきます。それが空文字かどうかは [isEmpty](https://developer.apple.com/documentation/swift/string/1539462-isempty) で判定できます。
|
1
|
+
[UITextField](https://developer.apple.com/documentation/uikit/uitextfield) の `text` に入力された文字列が入ってきます。それが空文字かどうかは [isEmpty](https://developer.apple.com/documentation/swift/string/1539462-isempty) で判定できます。
|
2
|
+
|
3
|
+
空白の除去には、 [trimmingCharacters(in:)](https://developer.apple.com/documentation/swift/string/1643030-trimmingcharacters) が使えそうです。
|
4
|
+
空白を表すパラメータは [whitespaces](https://developer.apple.com/documentation/foundation/characterset/1779930-whitespaces) とあります。
|