Skip to content
/ strings Public

Collection of string utility functions to make working with text easier.

License

Notifications You must be signed in to change notification settings

tui-js/strings

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🪢 Strings

Strings is a collection of utility functions to make working with strings, characters and text as a whole easier.

🪛 Features

Strings includes features such as:

  • charWidth and textWidth – to get actual width (in columns) occupied by a string in the terminal
  • charName – to get name of given character
  • cropStart, cropEnd and slice – to make working with cutting and cropping strings to fit within certain width easy
  • dimensions – to get space occupied by a string in the terminal (both rows and columns!)
  • insert – to overlay string on top of another
  • stripStyles – to remove ANSI escape codes from a string

📝 Licensing

This project is available under MIT License conditions.