September 2017 Update

This commit is contained in:
Ingy döt Net 2017-09-23 10:01:46 +02:00
parent bba7bfd280
commit ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions

View file

@ -1,2 +0,0 @@
input a$
print len(a$)

View file

@ -1,7 +0,0 @@
# -*- coding: utf-8 -*-
puts "あいうえお".length
# => 5
puts "あいうえお".size # alias for length
# => 5

View file

@ -1,4 +0,0 @@
# -*- coding: iso-8859-1 -*-
s = "møøse"
puts "Byte length: %d" % s.bytesize
puts "Character length: %d" % s.length

View file

@ -1,4 +0,0 @@
# -*- coding: utf-8 -*-
s = "møøse"
puts "Byte length: %d" % s.bytesize
puts "Character length: %d" % s.length

View file

@ -1,4 +0,0 @@
# -*- coding: gb18030 -*-
s = "møøse"
puts "Byte length: %d" % s.bytesize
puts "Character length: %d" % s.length

View file

@ -1,12 +0,0 @@
# -*- coding: utf-8 -*-
class String
# Define String#bytesize for Ruby 1.8.6.
unless method_defined?(:bytesize)
alias bytesize length
end
end
s = "文字化け"
puts "Byte length: %d" % s.bytesize
puts "Character length: %d" % s.gsub(/./u, ' ').size