Jump to content



Photo

_stringremove


  • Please log in to reply
No replies to this topic

#1 RazerM

RazerM

    cowinkeedenky - coincidence?

  • Active Members
  • PipPipPipPipPipPip
  • 1,246 posts

Posted 27 April 2006 - 07:58 PM

I made this so you don't have to write lots of string replaces
AutoIt         
;=============================================================================== ; ; Function Name:   _StringRemove ; Description:: Removes certain characters or phrases from a string ; Parameter(s): $s_string - String ;                  $s_remove - Characters to be removed (separated by $s_delim) ;                  $s_delim[optional] (delimiter '|' by default) ; Requirement(s):  None ; Return Value(s): On Success - String with removed characters ;                  On Failure - 0 ; Author(s):       RazerM ; Notes:           Only useful when removing lots of characters ; Example:         MsgBox(0,0,_StringRemove("102.3040506.0700...80900.", "0|.")) ; ;=============================================================================== ; Func _StringRemove($s_string, $s_remove, $s_delim = "|")     $s_remove = StringSplit($s_remove, $s_delim)     If @error Then Return 0     For $i = 1 To $s_remove[0]         $s_string = StringReplace($s_string, $s_remove[$i], "")         If @error Then Return 0     Next     Return $s_string EndFunc

Edited by RazerM, 19 May 2006 - 03:31 PM.

My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.








0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users