commandlineparser / commandlineparser/commandline

How to convert string to string[]

Ouverte
#679 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
C#
Étoiles
4.8k
Forks
478
Métriques de merge des PR
Aucune PR mergée en 30 j

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[]?

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.