PageRenderTime 38ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/Main/src/DynamicDataDisplay/Common/TokenizerHelper.cs

#
C# | 24 lines | 21 code | 3 blank | 0 comment | 3 complexity | a114997e6205c83b6c59278f06d3a001 MD5 | raw file
Possible License(s): CC-BY-SA-3.0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Globalization;
  6. namespace Microsoft.Research.DynamicDataDisplay.Common
  7. {
  8. internal static class TokenizerHelper
  9. {
  10. public static char GetNumericListSeparator(IFormatProvider provider)
  11. {
  12. char separator = ',';
  13. NumberFormatInfo numberInfo = NumberFormatInfo.GetInstance(provider);
  14. if (numberInfo.NumberDecimalSeparator.Length > 0 && separator == numberInfo.NumberDecimalSeparator[0])
  15. {
  16. separator = ';';
  17. }
  18. return separator;
  19. }
  20. }
  21. }