Jump to content

String help


Recommended Posts

How can i strip a string of everything after a given delimiter such as whitespace?

something like

$test = "thisis aTest"

$test2 = function($test, " ")

$test2 would = "thisis"

is there a builtin function for this or would i need to make some kind of parser

Link to comment
Share on other sites

hey thanks man havent been around the language much since i started taking java classes (no pun intended).

Nice one even if you meant to do it, and I'm typically not a fan of puns. Also, don't forget that you can combine your function calls:

$test = "thisis aTest"
$test2 = StringLeft($test,StringInStr($test," ") - 1)
MsgBox(0,"output",$test2)
Link to comment
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
 Share

  • Recently Browsing   0 members

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