AcTools.Utils.Helpers.FlexibleParser.TryParseLong C# (CSharp) Method

TryParseLong() public static method

public static TryParseLong ( string s, long &value ) : bool
s string
value long
return bool
        public static bool TryParseLong(string s, out long value) {
            if (_parseInt == null) {
                _parseInt = new Regex(@"-? *\d+");
            }

            if (s != null) {
                var match = _parseInt.Match(s);
                if (match.Success) {
                    return long.TryParse(match.Value.Replace(" ", ""), NumberStyles.Any,
                                        CultureInfo.InvariantCulture, out value);
                }
            }

            value = 0;
            return false;
        }

Same methods

FlexibleParser::TryParseLong ( string s ) : long?