mirror of
https://codeberg.org/Ikatono/TierMaker.git
synced 2025-10-28 20:45:35 -05:00
44 lines
1.2 KiB
C#
44 lines
1.2 KiB
C#
// using System.Collections.Generic;
|
|
|
|
// public static class CommandParser
|
|
// {
|
|
// public static List<string> SplitString(string s)
|
|
// {
|
|
// List<string> l = new();
|
|
// bool quoted = false;
|
|
// bool escaped = false;
|
|
// bool trimming = true;
|
|
// string current = "";
|
|
// foreach (char c in s)
|
|
// {
|
|
// switch (c)
|
|
// {
|
|
// case '\\':
|
|
// if (escaped)
|
|
// current += '\\';
|
|
// escaped = !escaped;
|
|
// break;
|
|
// case '"':
|
|
// if (escaped)
|
|
// {
|
|
// current += '"';
|
|
// escaped = false;
|
|
// }
|
|
// else
|
|
// {
|
|
// if (quoted)
|
|
// {
|
|
// quoted = false;
|
|
|
|
// }
|
|
// else
|
|
// {
|
|
|
|
// }
|
|
// }
|
|
// break;
|
|
// case
|
|
// }
|
|
// }
|
|
// }
|
|
// } |