Jump to content
Sign in to follow this  

Good (unique) String Separator for Array building from string?

Recommended Posts

I don't like building arrays in basic languages becuase it entails manually casting the size of the array and I always end up manually changing it often so what I've found myself doing is fudging two dimensional arrays by using different string separators. so my strings will look something like:

$futureArray = "test1--=--test2--=--test3--=--test4" & @CRLF

$futureArray &= "test5--=--test6--=--test7--=--test8" & @CRLF

and then i'll use stringsplit twice to parse out the associated values; first by CRLF and then by "--=--". My question is this, has anyone come across some good unique separators i *should* be using instead for one reason or another?

My Additions:- RunAs AdminDeviant Fun:- Variable Sound Volume

Share this post

Link to post
Share on other sites

There are no separators you *should* use, common are pipes "|" and linebreaks "(CR)LF"

You can user Chr(2) to separate the fields and Chr(3) to separate the lines for example, too.

Or use a proper CSV encoding.

Edited by ProgAndy

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...