百度知道手把手的字符串操作啊
http://jingyan.baidu.com/article/20b68a8854f919796dec6265.html