取第一位和最後一位: str.substring(0, 1) str.substring(str.Length-1, 1) 來源: https://zhidao.baidu.com/question/423908312.html