閑云無衣
          無衣的筆記
          split()
          trim()
          indexOf()
          replaceAll()
          ##ruby:
          String.split
          "hello world".split( " ")
          returns [ "hello", "world" ].
          String.strip
          " hello world ".strip
          returns "hello world".
          String.index
          "hello world".index( "w")
          returns 6.
          String.gsub(/\s/, ',')
          "hello word".gsub(\/s\, ',')
          returns "hello,word"
          p.s.
          sub() replace first
          gsub() replace all
          posted on 2007-02-22 15:22 無衣 閱讀(1217) 評論(0)  編輯  收藏 所屬分類: rails
           
          主站蜘蛛池模板: 镇康县| 济宁市| 大埔县| 辽源市| 泾源县| 塔河县| 沙雅县| 英吉沙县| 无为县| 义马市| 衡阳县| 白山市| 五原县| 富宁县| 靖江市| 连城县| 财经| 那坡县| 繁昌县| 青龙| 资阳市| 滨海县| 革吉县| 双辽市| 方城县| 峨眉山市| 焦作市| 桃园市| 乌拉特后旗| 西昌市| 格尔木市| 南陵县| 丰县| 始兴县| 惠来县| 文登市| 宜兴市| 屏东县| 丹棱县| 临朐县| 乌审旗|