Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/Common/String.rb

Overview

this file is part of manqod manqod is distributed under the CDDL licence the author of manqod is Dobai-Pataky Balint([email protected])

Instance Method Summary collapse

Instance Method Details

#indexU(k, offset = 0) ⇒ Object



6
7
8
9
10
# File 'lib/Common/String.rb', line 6

def indexU(k,offset=0)
	i=self.upcase.index(k.upcase,offset)
	s=i ? i==0 ? 0 : self[0 .. i-1].lengthU : nil
	s && s >= offset ? s : nil
end

#lengthUObject



11
12
13
# File 'lib/Common/String.rb', line 11

def lengthU
	self.scan(/./mu).size
end