Parse filename / drop extension #21522
Unanswered
danabooth
asked this question in
Questions and Answers
Replies: 1 comment 2 replies
-
You could use https://modules.vlang.io/index.html#string.all_before_last and pass '.' as the parameter. If it might be a full path, use https://modules.vlang.io/os.html#file_name first to strip of the name, then all_before_last to strip off the extension. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Very new to V, (and not an experienced programmer by any means) and just ran into the situation where I'd like to drop the extension from a filename which is a command line argument. Now of course I could do that by hand, but didn't want to make something just to have someone dump on me because there's already a function for that. If there is, Startpage can't find it, but is there?
Beta Was this translation helpful? Give feedback.
All reactions