Strip a set of characters from a string: Difference between revisions
Strip a set of characters from a string (view source)
Revision as of 09:19, 13 September 2022
, 1 year agono edit summary
(Adds slope example) |
No edit summary |
||
Line 1,459:
In '''[https://formulae.org/?example=Strip_a_set_of_characters_from_a_string this]''' page you can see the program(s) related to this task and their results.
=={{header|FutureBasic}}==
<syntaxhighlight lang="futurebasic">window 1, @"Strip a set of characters from a string"
local fn StringByStrippingCharacters( string as CFStringRef, chrs as CFStringRef ) as CFStringRef
end fn = fn ArrayComponentsJoinedByString( fn StringComponentsSeparatedByCharactersInSet( string, fn CharacterSetWithCharactersInString( chrs ) ), @"" )
CFStringRef string, chrs
string = @"She was a soul stripper. She took my heart!"
chrs = @"aei"
print string
print fn StringByStrippingCharacters( string, chrs )
HandleEvents</syntaxhighlight>
{{out}}
<pre>
She was a soul stripper. She took my heart!
Sh ws soul strppr. Sh took my hrt!
</pre>
=={{header|Gambas}}==
|