Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

readme.md 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # string-length
  2. > Get the real length of a string - by correctly counting astral symbols and ignoring [ansi escape codes](https://github.com/sindresorhus/strip-ansi)
  3. `String#length` erroneously counts [astral symbols](https://web.archive.org/web/20150721114550/http://www.tlg.uci.edu/~opoudjis/unicode/unicode_astral.html) as two characters.
  4. ## Install
  5. ```
  6. $ npm install string-length
  7. ```
  8. ## Usage
  9. ```js
  10. const stringLength = require('string-length');
  11. '🐴'.length;
  12. //=> 2
  13. stringLength('🐴');
  14. //=> 1
  15. stringLength('\u001B[1municorn\u001B[22m');
  16. //=> 7
  17. ```
  18. ## Related
  19. - [string-length-cli](https://github.com/LitoMore/string-length-cli) - CLI for this module
  20. - [string-width](https://github.com/sindresorhus/string-width) - Get visual width of a string
  21. ---
  22. <div align="center">
  23. <b>
  24. <a href="https://tidelift.com/subscription/pkg/npm-string-length?utm_source=npm-string-length&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
  25. </b>
  26. <br>
  27. <sub>
  28. Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
  29. </sub>
  30. </div>