示例#1
0
        public List <string> Parents(string hash, int precision = 1)
        {
            var result = new List <string>();

            while (hash.Length > precision)
            {
                hash = hasher.GetParent(hash);
                result.Add(hash);
            }

            return(result);
        }
        public void Should_Give_Parent()
        {
            var hasher = new Geohasher();

            Assert.Equal("u33db", hasher.GetParent("u33dbc"));
        }