我應該如何從字符串中刪除所有前導空格? - 迅速 - How should I remove all the leading spaces from a string? - swift

問題:

I need a way to remove the first character from a string which is a space.我需要一種方法來從作爲空格的字符串中刪除第一個字符。 I am looking for a method or even an extension for the String type that I can use to cut out a character of a string.我正在尋找一種方法,甚至是 String 類型的擴展,我可以用它來剪切字符串的一個字符。


解決方案:

參考一: https://en.stackoom.com/question/1vsc9
參考二: https://stackoom.com/question/1vsc9
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章