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