1.0.0 • Published 8 years ago

next-lang-string v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 years ago

#next-lang-string

##description:

  • String helper based on next toolkit.

##usage:

  • get string util:
  var StringUtil=nx.lang.String;
  • trim:
  var abc='   abc ';
  console.log(
    StringUtil.trim(abc)
  );
  //result:
  //abc
  • camelCase:
  var str2='font-size';
  console.log(
    StringUtil.camelCase(abc)
  );
  //result:
  //fontSize
  • hyphenate:
  var str3='fontWeight';
  console.log(
    StringUtil.hyphenate(abc)
  );
  //result:
  //font-weight
  • capitalize:
  var str3='abc';
  console.log(
    StringUtil.capitalize(abc)
  );
  //result:
  //Abc
  • repeat:
  var str3='abc';
  console.log(
    StringUtil.repeat('a',3)
  );
  //result:
  //aaa

##test

  • install mocha -g
  • mocha
1.0.0

8 years ago