Strip a set of characters from a string: Difference between revisions
Content deleted Content added
{{header|Liberty BASIC}} |
|||
Line 212: | Line 212: | ||
print( stripchars( "She was a soul stripper. She took my heart!", "aei" ) )</lang> |
print( stripchars( "She was a soul stripper. She took my heart!", "aei" ) )</lang> |
||
=={{header|Liberty BASIC}}== |
|||
<lang lb> |
|||
Print stripchars$("She was a soul stripper. She took my heart!", "aei", 1) |
|||
End |
|||
Function stripchars$(strip$, chars$, num) |
|||
For i = 1 To Len(strip$) |
|||
If Mid$(strip$, i, 1) <> Mid$(chars$, num, 1) Then |
|||
stripchars$ = (stripchars$ + Mid$(strip$, i, 1)) |
|||
End If |
|||
Next i |
|||
If (num <= Len(chars$)) Then stripchars$ = stripchars$(stripchars$, chars$, (num + 1)) |
|||
End Function |
|||
</lang> |
|||
=={{header|Nemerle}}== |
=={{header|Nemerle}}== |
||
<lang Nemerle>StripChars( text : string, remove : string ) : string |
<lang Nemerle>StripChars( text : string, remove : string ) : string |