方法名 | 使用方法 | 解釋 |
center | astring.center(w) | 返回一個字符串, w 長度,原字符串居中 |
count | astring.count(item) | 返回原字符串中出現item 的次數 |
ljust | astring.ljust(w) | 返回一個字符串, w 長度,原字符串居左 |
lower | astring.lower() | 返回一個字符串,全部小寫 |
rjust | astring.rjust(w) | 返回一個字符串, w 長度,原字符串居右 |
find | astring.find(item) | 查詢item,返回第一個匹配的索引位置 |
split | astring.split(schar) | 以schar 爲分隔符,將原字符串分割,返回一個 列表 |