[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Getting part of a string
- From: "Aggelos Kolaitis" <neoaggelos@...>
- Date: Fri, 12 Apr 2013 16:57:36 -0700 (PDT)
I'm relatively new to scripting with Lua, ( I use it mostly for writing premake scripts).
Anyway, I would like to know how it could be possible to extract parts of a string. Since I can't specify exactly what I want, I will tell you with an example.
I handle all the command line arguments given to the script via a global _ARGS table. What I want is to handle arguments like --prefix=path.
(Check if the argument starts with --prefix=, and if so get the path value)
So How can I get the value of path only, which practically means the contents of a string after a given index.
Is something like that possible ?
Thanks in advance,