Jump to content

Search the Community

Showing results for tags 'clean control char'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. Hello, I'm comming from the french site "Autoitsript.fr" with the following question or problem. I try to use StringStripWS to clean spaces and control characters in a string. Here is my code. #include <String.au3> #include <StringConstants.au3> #include <Array.au3> ;---- Part 1 Local $sText = @TAB & "This is a new story." & @CR & @LF & "Once upon a time ... " Local $sCheck = "" $sCheck = StringStripWS($sText, BitOR($STR_STRIPLEADING, $STR_STRIPTRAILING, $STR_STRIPSPACES)) ;$sCheck = StringStripWS($sText, $STR_STRIPLEADING + $STR_STRIPTRAILING + $STR_STRIPSPACES) ConsoleWrite($sCheck & @CRLF) For $i = 1 to stringlen($sCheck) ConsoleWrite(stringmid($sCheck,$i,1) & "-" & Asc(stringmid($sCheck,$i,1)) & @CRLF) next ; Part 2 --- Workarround submited by "jchd" on he french site Local $sText = @TAB & " This is a new story." & @CR & @LF & "Once upon a time ... " Local $sCheck = StringStripWS(StringRegExpReplace($sText, "[[:space:]]+", " "), $STR_STRIPLEADING + $STR_STRIPTRAILING + $STR_STRIPSPACES) ConsoleWrite(">" & $sCheck & "<" & @LF) _ArrayDisplay(StringToASCIIArray($sCheck)) The help file tells : But if we check the console after program execution , the CarriageReturn (Chr(13) is still there. This is a mistake of the program, a bug or a feature of StringStripWS or a mistake in the help file. I use AutoIt v3.3.14.5. We have already a workaround (Part 2). Thanks in advance for your replies.
×
×
  • Create New...