Muhammad_Awais_Sharif

String split into char

4 posts in this topic

How To split string into Array of char ?

Share this post


Link to post
Share on other sites



Muhammad_Awais_Sharif,

Easy:

#include <Array.au3>

$sString = "qwertyuiop"

$aArray = StringSplit($sString, "")

_ArrayDisplay($aArray, "", Default, 8)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

Share this post


Link to post
Share on other sites

Thank you so much :D 
 

Share this post


Link to post
Share on other sites

In case you need AscW() of all individual characters, StringToASCIIArray is there (not limited to ASCII despite the name).

1 person likes this

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

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

  • Similar Content

    • david1337
      Find ID of Listview item by stringname
      By david1337
      Hey guys
      This may be quite simple, but I haven't manage to solve it yet :/
      All I want to do is get the ID of Xitem, so I can click it with " _GUICtrlListView_ClickItem" .
      So I need to find the item based on the that fact that I know the text/string name of that item.
       
      #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <WindowsConstants.au3> Example() Func Example() GUICreate("listview items", 300, 300, -1, -1) Local $idListview = GUICtrlCreateListView("col1", 10, 10, 200, 150) ;,$LVS_SORTDESCENDING) Local $idButton = GUICtrlCreateButton("ID_of_Xitem?", 75, 170, 70, 20) Local $idItem1 = GUICtrlCreateListViewItem("Aitem", $idListview) Local $idItem2 = GUICtrlCreateListViewItem("Xitem", $idListview) Local $idItem3 = GUICtrlCreateListViewItem("Zitem", $idListview) GUISetState(@SW_SHOW) ; Loop until the user exits. While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $idButton MsgBox(0,"","ID of Xitem is ?") _GUICtrlListView_ClickItem($clv, ?) EndSwitch WEnd EndFunc ;==>Example  
    • 31290
      convert array index to proper value
      By 31290
      Hi guys,
      I'm facing a problem that I can't solve, despite trying hard.
      I have an .ini file with several sections:
      [Latitude E5440] URL=http://downloads.dell.com/published/pages/latitude-e5440-laptop.html [Latitude E5450] URL=http://downloads.dell.com/published/pages/latitude-e5450-laptop.html [Latitude E5470] URL=http://downloads.dell.com/published/pages/latitude-e5470-laptop.html [Latitude E7240] URL=http://downloads.dell.com/published/pages/latitude-e7240-ultrabook.html [Latitude E7250] URL=http://downloads.dell.com/published/pages/latitude-e7250-ultrabook.html [Latitude E7270] URL=http://downloads.dell.com/published/pages/latitude-e7270-ultrabook.html Then I collect the computer model name and try to look if it exists in the ini file. But, when performing the search, I only got the index in the array.
      For example, my computer model is a "Latitude E7240". An "_ArraySearch" gives me "4" as a result and because this is also the fourth place of my search in the ini file. It works well if I move the section anywhere else in the file and always give me the correct position.
      Question is: How can I convert the index number to the section name so I can tell my script that if it's found in the ini file, the download URL variable will be set to the corresponding key in the ini file.
      Here's my code so far:
      Can someone give me an hand on this?
      Thanks
      -31290-
    • Muhammad_Awais_Sharif
      StringIsDigit Does not work properly
      By Muhammad_Awais_Sharif
      Why this code does not work ?
      $tmp = "1111" If StringIsDigit($tmp) == True Then MsgBox(0,"",StringIsDigit($tmp) == "1") EndIf and this one works 
      $tmp = "1111" If StringIsDigit($tmp) == "1" Then MsgBox(0,"",StringIsDigit($tmp) == "1") EndIf  
    • ruslanas402
      Open webpages by checking boxes
      By ruslanas402
      Hello everyone, don't even know how to ask.  My code is:
      #include <String.au3> #include <IE.au3> #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Form1", 700, 500, 192, 124) $Button1 = GUICtrlCreateButton("View", 576, 24, 89, 41) Global $oIE = _IECreate("https://www.youtube.com/playlist?list=PL4Jcq5zn02jKpjX0nqI1_fS7mEEb5tw6z", 1, 1, 0) Sleep(1000) Global $sHTML = _IEDocReadHTML($oIE) $FirstChunks = _StringBetween($sHTML, 'pl-video-title-link yt-uix-tile-link yt-uix-sessionlink', '<div class="pl-video-owner') $x = 16 For $a In $FirstChunks $actualdata = _StringBetween($a, '">', '</a>') ;$actualdata2 = _StringBetween($a, 'href="', '&amp;') $Checkbox1 = GUICtrlCreateCheckbox($actualdata[0], 24, $x, 500, 17) $x = $x + 20 Next GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Somehow I need to open webpages where checkbox is checked by presing button view, I think I need somehow asign $actualdata with $actualdata2. Any ideas would be very appreciated
    • ruslanas402
      StringBetween doesn't print out
      By ruslanas402
      Why doesn't print the output??

      #include <String.au3> Global $x = 'gdsgklj fsdl dasfgh fsfef ghterfsd kia gdfhgfgdsgklj fsdl dasfgh fsfef' $z = _StringBetween($x, 'fsdl', 'kia') ConsoleWrite($z & @CRLF)
      Shouldn't it be
      dasfgh fsfef ghterfsd   instead of nothing?