commandlineparser / commandlineparser/commandline

How to convert string to string[]

Open
#679 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
4.8k
Forks
478
PR merge metrics
No merged PRs in 30d

Description

I have this string:
--text "Hello World" --desc "Prints hello world to the screen"
Using string.split(' '); splits it on every space including inside the quotes

Is there any function to split this string with respect to the quotes so I can parse it as a string[]?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.