O Reilly Ruby Cookbook source code

源代码在线查看: 07 - processing a string one character at a time.rb

软件大小: 292 K
上传用户: lz0324
关键词: Cookbook Reilly source Ruby
下载地址: 免注册下载 普通下载 VIP

相关代码

				'foobar'.each_byte { |x| puts "#{x} = #{x.chr}" }				# 102 = f				# 111 = o				# 111 = o				# 98 = b				# 97 = a				# 114 = r				#---				'foobar'.scan( /./ ) { |c| puts c }				# f				# o				# o				# b				# a				# r				#---				"foo\nbar".each { |x| puts x }				# foo				# bar				#---				french = "\xc3\xa7a va"				#---				french.scan(/./) { |c| puts c }				# 			

相关资源