review comments incorporated
This commit is contained in:
parent
2e3b614c92
commit
5bef23d6e1
@ -194,14 +194,12 @@ module Parfait
|
|||||||
end
|
end
|
||||||
def start_with(other)
|
def start_with(other)
|
||||||
return false if other.length > self.length
|
return false if other.length > self.length
|
||||||
str=self.to_string
|
s = other.length
|
||||||
prefix=other.to_string
|
temp = Word.new(other.length)
|
||||||
s = str.size()
|
|
||||||
temp=""
|
|
||||||
i=0
|
i=0
|
||||||
while i<=s-1
|
while i<=s-1
|
||||||
temp=temp+str[i]
|
temp.set_char(i,self.get_char(i))
|
||||||
if temp==prefix
|
if temp.compare(other)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
i=i+1
|
i=i+1
|
||||||
|
Loading…
Reference in New Issue
Block a user