diff options
| author | chai <215380520@qq.com> | 2023-05-12 10:32:11 +0800 |
|---|---|---|
| committer | chai <215380520@qq.com> | 2023-05-12 10:32:11 +0800 |
| commit | 2fc9585797067730f28b03b0727bf05f9deed091 (patch) | |
| tree | 8807e37b85ba922045eaa17ac445dd0a1d2d730c /WorldlineKeepers/Assets/ThirdParty/CSV-Parser/CSV Parser/src/DelimiterExtensions.cs | |
| parent | 2a1cd4fda8a4a8e649910d16b4dfa1ce7ae63543 (diff) | |
+ worldline keepers
Diffstat (limited to 'WorldlineKeepers/Assets/ThirdParty/CSV-Parser/CSV Parser/src/DelimiterExtensions.cs')
| -rw-r--r-- | WorldlineKeepers/Assets/ThirdParty/CSV-Parser/CSV Parser/src/DelimiterExtensions.cs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/WorldlineKeepers/Assets/ThirdParty/CSV-Parser/CSV Parser/src/DelimiterExtensions.cs b/WorldlineKeepers/Assets/ThirdParty/CSV-Parser/CSV Parser/src/DelimiterExtensions.cs new file mode 100644 index 0000000..a38371d --- /dev/null +++ b/WorldlineKeepers/Assets/ThirdParty/CSV-Parser/CSV Parser/src/DelimiterExtensions.cs @@ -0,0 +1,24 @@ +using System; +using System.ComponentModel; + +namespace yutokun +{ + public static class DelimiterExtensions + { + public static char ToChar(this Delimiter delimiter) + { + // C# 7.3: Unity 2018.2 - 2020.1 Compatible + switch (delimiter) + { + case Delimiter.Auto: + throw new InvalidEnumArgumentException("Could not return char of Delimiter.Auto."); + case Delimiter.Comma: + return ','; + case Delimiter.Tab: + return '\t'; + default: + throw new ArgumentOutOfRangeException(nameof(delimiter), delimiter, null); + } + } + } +} |
