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 閱讀(1559) 評論(2)  編輯  收藏

          FeedBack:
          # re: String java.lang.String.trim()[未登錄]
          2008-08-31 14:54 | 過客
          可以自己寫點不 。。擦,文檔上的copy來有意思么。。》??  回復  更多評論
            
          # re: String java.lang.String.trim()[未登錄]
          2008-09-08 22:10 | happytian
          :-),這些本來就是自己經歷過的問題,解決了,再把這些資料收集一下,下次碰到了好找,自己寫是自己的愛好,自己收集也是為了方便  回復  更多評論
            

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          <2008年9月>
          31123456
          78910111213
          14151617181920
          21222324252627
          2829301234
          567891011

          Welcome here, my friend!

          常用鏈接

          留言簿(12)

          隨筆檔案(66)

          文章分類

          文章檔案(63)

          web

          最新隨筆

          搜索

          •  

          積分與排名

          • 積分 - 89361
          • 排名 - 647

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 阜新| 柘城县| 栾城县| 长兴县| 新绛县| 宁安市| 马鞍山市| 西昌市| 仁怀市| 炉霍县| 禹城市| 绍兴县| 保亭| 汽车| 镇远县| 宿迁市| 阜新市| 石门县| 南汇区| 普兰县| 柘荣县| 西畴县| 富阳市| 潼关县| 健康| 德兴市| 盐亭县| 石林| 通化市| 绍兴县| 南汇区| 抚州市| 珠海市| 班戈县| 九寨沟县| 化德县| 宁陕县| 遵义县| 云霄县| 闽侯县| 吉木乃县|