vMix Forums
»
General
»
General Discussion
»
removing leading zeros in string variable
Rank: Newbie
Groups: Registered
Joined: 5/18/2020(UTC) Posts: 6 Location: Maryland
|
I'm trying to remove leading zeros from a string variable.
3 instead of 003
I can't seem to understand how to get from a string functions I can find searching for VB.Net string functions like
Mid(String, Int32)
into the format needed in vmix script like
activeinputname.Substring(V_position,2)
I believe it has something to do with methods but those far I haven't figured it out. Is there a resource available which shows the methods available in vmix scripting. They seem similar to Javascript but not exactly
One idea I thought of was to convert string to integer and then back to string to strip leading zeros, but I couldn't find correct syntax for that.
Thanks in advance for any assistance.
Jim
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 11/11/2016(UTC) Posts: 378 Location: Europe Thanks: 23 times Was thanked: 38 time(s) in 32 post(s)
|
in VB cstr(val("003")) will return "3"
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 5/18/2020(UTC) Posts: 6 Location: Maryland
|
I'm sorry but I don't understand how to script with that command.
test = cstr(val("003"))
doesn't work with error message "val" is not declared. This is the same issue I have with other string manipulation commands.
What would be the syntax in vmix scripting to set string variable test to the string variable value without leading zeros
Thanks
|
|
|
|
Rank: Advanced Member
Groups: Registered
Joined: 11/11/2016(UTC) Posts: 378 Location: Europe Thanks: 23 times Was thanked: 38 time(s) in 32 post(s)
|
|
|
|
|
vMix Forums
»
General
»
General Discussion
»
removing leading zeros in string variable
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The vMix Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close