Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Computes a numerical signature of a string. It just sums up the charCodes of all the characters of the input string.
- * @param{String} ofString The string to calculate.
- */
- function getSpeedySignature (ofString) {
- var sum
- ,len
- ,i;
- sum = 0;
- len = ofString.length;
- for (i = 0; i < len; i++) {
- sum += ofString.charCodeAt(i);
- }
- return sum;
- }
Add Comment
Please, Sign In to add comment