Jump to content

Recommended Posts

Posted (edited)

How can I get a substring? It should be something like:

$a = the substring
$b = "string"
$a = b.substring (2,6)
;$a would have to be "ring"

Does AutoIt support substrings?

Edit: I know about _StringSplit, but is there a more direct way, to select the number in a word of the first and last character your substring must have?

Edit2: Ok, I've got it :P I should use StringTrimLeft/Right. Sorry for the useless topic.:)

Edited by Kiti
Posted

How can I get a substring? It should be something like:

$a = the substring
 $b = "string"
 $a = b.substring (2,6)
;$a would have to be "ring"

Does AutoIt support substrings?

Edit: I know about _StringSplit, but is there a more direct way, to select the number in a word of the first and last character your substring must have?

Edit2: Ok, I've got it :P I should use StringTrimLeft/Right. Sorry for the useless topic. :)

You should use StringMid. That function is specifically meant for what you are doing.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...