Contributed by Jun NAITOH.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5331
e93f8b46-1217-0410-a6f0-
8f06a7374b81
nb=s.length
i=0
while(i<nb)
- c=s[i]
+ c = s[i].is_a?(String) ? s[i].ord : s[i]
if(c<128)
l+=cw[c.chr] if cw[c.chr]
i+=1
nl=1
while(i<nb)
#Get next character
- c=s[i]
+ c = s[i].is_a?(String) ? s[i].ord : s[i]
#Check if ASCII or MB
ascii=(c<128)
if(c.chr=="\n")
nl=1
while(i<nb)
#Get next character
- c=s[i]
+ c = s[i].is_a?(String) ? s[i].ord : s[i]
#Check if ASCII or MB
ascii=(c<128)
if(c.chr=="\n")
nb=s.length
i=0
while(i<nb)
- o=s[i]
+ o = s[i].is_a?(String) ? s[i].ord : s[i]
if(o<128)
#ASCII
l+=cw[o.chr] if cw[o.chr]
nl=1
while(i<nb)
#Get next character
- c=s[i]
+ c = s[i].is_a?(String) ? s[i].ord : s[i]
o=c #o=ord(c)
if(o==10)
#Explicit line break
nl=1
while(i<nb)
#Get next character
- c=s[i]
+ c = s[i].is_a?(String) ? s[i].ord : s[i]
o=c
if(o==10)
#Explicit line break
nb=s.length\r
i=0\r
while(i<nb)\r
- c=s[i]\r
+ c = s[i].is_a?(String) ? s[i].ord : s[i]\r
if(c<128)\r
l+=cw[c.chr] if cw[c.chr]\r
i+=1\r
nl=1\r
while(i<nb)\r
#Get next character\r
- c=s[i]\r
+ c = s[i].is_a?(String) ? s[i].ord : s[i]\r
#Check if ASCII or MB\r
ascii=(c<128)\r
if(c.chr=="\n")\r
nl=1\r
while(i<nb)\r
#Get next character\r
- c=s[i]\r
+ c = s[i].is_a?(String) ? s[i].ord : s[i]\r
#Check if ASCII or MB\r
ascii=(c<128)\r
if(c.chr=="\n")\r