canl function was added.
can function was moved to util/general.js.
added spec for util/general.js.
unify common logics in util/strings.js.