Old high school files. Lessson notes/codes/projects etc.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
hsf/rep2/2.rb

10 lines
142 B

# 2
def delete_char(str, char)
newstr = ""
str.split("").each do |c|
if( c == char ) then next end
newstr += c
end
return newstr
end