2007年9月28日

Ruby字符串操作总结

摘要: 字符串的整理如下: Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->1、字符串定义与产生 str1 = 'Hello world' str2 = "Hello world" #双引号比单引号定义的字符串更加强大,如可提供转移字符等 str... 阅读全文

posted @ 2007-09-28 01:22 面朝大海 阅读(4561) 评论(1) 推荐(0) 编辑

Ruby数组操作的总结

摘要: 学习Ruby过程中总结了一些Ruby中常用的数组操作。 Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->1、数组定义 arr1 = [] arr2 = Array.new arr3 = ['1','2','3'] 2、输出 print arr... 阅读全文

posted @ 2007-09-28 00:56 面朝大海 阅读(13912) 评论(3) 推荐(0) 编辑

导航