hash-string*

functionsince v0.0-2261Edit
(hash-string* s)

Source code @ clojurescript:src/main/cljs/cljs/core.cljs
(defn hash-string* [s]
  (if-not (nil? s)
    (let [len (.-length s)]
      (if (pos? len)
        (loop [i 0 hash 0]
          (if (< i len)
            (recur (inc i) (+ (imul 31 hash) (.charCodeAt s i)))
            hash))
        0))
    0))