Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Amount of String, within a String.

$
0
0
I have done a search on the forums as well as the help file, but couldn't really find anything.

I don't suppose there is a function to do something like this;

[ autoit ]      
$Temp = Amount(', , , , , , , ', ',') ConsoleWrite('The Amount of , in the string was ' & $Temp) Func Amount($String, $SubString) Local $Temp = 1 While StringInStr($String, $SubString, 1, $Temp) $Temp += 1 WEnd Return $Temp-1 EndFunc

Where it tells you, how many of a "Certain" thing is in the given string.

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>