posts - 66,  comments - 40,  trackbacks - 0

          Returns a copy of the string, with leading and trailing whitespace omitted.

          If this String object represents an empty character sequence, or the first and last characters of character sequence represented by this String object both have codes greater than '\u0020' (the space character), then a reference to this String object is returned.

          Otherwise, if there is no character with a code greater than '\u0020' in the string, then a new String object representing an empty string is created and returned.

          Otherwise, let k be the index of the first character in the string whose code is greater than '\u0020', and let m be the index of the last character in the string whose code is greater than '\u0020'. A new String object is created, representing the substring of this string that begins with the character at index k and ends with the character at index m-that is, the result of this.substring(k,?m+1).

          This method may be used to trim whitespace (as defined above) from the beginning and end of a string.

          Returns:
          A copy of this string with leading and trailing white space removed, or this string if it has no leading or trailing white space.
          posted on 2006-05-08 09:27 happytian 閱讀(1560) 評(píng)論(2)  編輯  收藏

          FeedBack:
          # re: String java.lang.String.trim()[未登錄](méi)
          2008-08-31 14:54 | 過(guò)客
          可以自己寫(xiě)點(diǎn)不 。。擦,文檔上的copy來(lái)有意思么。。》??  回復(fù)  更多評(píng)論
            
          # re: String java.lang.String.trim()[未登錄](méi)
          2008-09-08 22:10 | happytian
          :-),這些本來(lái)就是自己經(jīng)歷過(guò)的問(wèn)題,解決了,再把這些資料收集一下,下次碰到了好找,自己寫(xiě)是自己的愛(ài)好,自己收集也是為了方便  回復(fù)  更多評(píng)論
            

          只有注冊(cè)用戶(hù)登錄后才能發(fā)表評(píng)論。


          網(wǎng)站導(dǎo)航:
           
          <2008年8月>
          272829303112
          3456789
          10111213141516
          17181920212223
          24252627282930
          31123456

          Welcome here, my friend!

          常用鏈接

          留言簿(12)

          隨筆檔案(66)

          文章分類(lèi)

          文章檔案(63)

          web

          最新隨筆

          搜索

          •  

          積分與排名

          • 積分 - 89503
          • 排名 - 647

          最新評(píng)論

          閱讀排行榜

          評(píng)論排行榜

          主站蜘蛛池模板: 从化市| 彝良县| 大余县| 米泉市| 水城县| 鄂州市| 中宁县| 恩平市| 宝兴县| 中超| 香河县| 鹰潭市| 临湘市| 天门市| 江口县| 茂名市| 湘潭县| 错那县| 德昌县| 隆回县| 建湖县| 宁阳县| 夏河县| 华亭县| 宜昌市| 娱乐| 抚州市| 高清| 佛山市| 苗栗市| 高青县| 宁陕县| 棋牌| 延寿县| 独山县| 山阳县| 石嘴山市| 平和县| 黄梅县| 泸水县| 屏东县|