Skip to content

Latest commit

 

History

History
18 lines (13 loc) · 314 Bytes

README.md

File metadata and controls

18 lines (13 loc) · 314 Bytes

str2int

Encode string to int

use for select somthing random with string

Usage

var str2int = require('str2int');

str2int('a'); // => 97
str2int('A'); // => 65
str2int('Hello World'); // => 1052
str2int('World Hello'); // => 1052
str2int(''); // => 0
str2int('你好中国'); // => 85511