How to get a last word

Trying to parse a System.CommandLin, and I need to get a last word, in this example, it is DASH.
Below directory information could be changed and actually I can’t predict it.

With a Split function having " " delimiter, it doesn’t work.

Can you help me how to find the last word?

// System.CommandLine	
"C:\\Program Files (x86)\\KKK\\bin\\KKK.exe" DASH
		 
Dim getCommandLine(-1)as string
getCommandLine = Split(System.CommandLine," ")
	
DEBUG: getCommandLine(0) : "C:\\Program
DEBUG: getCommandLine(1) : Files
DEBUG: getCommandLine(2) : (x86)\\KKK\\bin\\KKK.exe"	
dim v() as string
v=split(getCommandLine," ")
return v(v.ubound)

not sure why you believe split with " " doesn’t work…

But that being said… I have found that (and this may only be with macOS), that the commandline you THINK you are getting is NOT what you really get.
I had an app where the returned command line on my computer was

yet on another users computer running the same app in the same manner they got

making the code I had to look for the programname incorrect

Ubound. Yes, that is it. It works now.

And, thanks for your additional comment about CommandLine.