module Strings
Constants
- VERSION
Public Class Methods
Align text within the width.
@see Strings::Align#align
@api public
# File lib/strings.rb, line 17 def align(*args, **kws) Align.align(*args, **kws) end
Align text with the width.
@see Strings::Align#align
@api public
# File lib/strings.rb, line 37 def align_center(*args) Align.align_center(*args) end
Align text left within the width.
@see Strings::Align#align_left
@api public
# File lib/strings.rb, line 27 def align_left(*args) Align.align_left(*args) end
Align text with the width.
@see Strings::Align#align
@api public
# File lib/strings.rb, line 47 def align_right(*args) Align.align_right(*args) end
Check if string contains ANSI codes
@see Strings::ANSI#ansi?
@api public
# File lib/strings.rb, line 57 def ansi?(string) ANSI.ansi?(string) end
Remove any line break characters from the text
@see Strings::Fold#fold
@api public
# File lib/strings.rb, line 67 def fold(*args) Fold.fold(*args) end
Apply padding to multiline text with ANSI codes
@see Strings::Pad#pad
@api public
# File lib/strings.rb, line 77 def pad(*args) Pad.pad(*args) end
Remove ANSI codes from the string
@see Strings::ANSI#sanitize
@api public
# File lib/strings.rb, line 87 def sanitize(string) ANSI.sanitize(string) end
Truncate a text at a given length
@see Strings::Truncate#truncate
@api public
# File lib/strings.rb, line 97 def truncate(*args) Truncate.truncate(*args) end
Wrap a text into lines at wrap length
@see Strings::Wrap#wrap
@api public
# File lib/strings.rb, line 107 def wrap(*args) Wrap.wrap(*args) end
Private Instance Methods
Align text within the width.
@see Strings::Align#align
@api public
# File lib/strings.rb, line 17 def align(*args, **kws) Align.align(*args, **kws) end
Align text with the width.
@see Strings::Align#align
@api public
# File lib/strings.rb, line 37 def align_center(*args) Align.align_center(*args) end
Align text left within the width.
@see Strings::Align#align_left
@api public
# File lib/strings.rb, line 27 def align_left(*args) Align.align_left(*args) end
Align text with the width.
@see Strings::Align#align
@api public
# File lib/strings.rb, line 47 def align_right(*args) Align.align_right(*args) end
Check if string contains ANSI codes
@see Strings::ANSI#ansi?
@api public
# File lib/strings.rb, line 57 def ansi?(string) ANSI.ansi?(string) end
Remove any line break characters from the text
@see Strings::Fold#fold
@api public
# File lib/strings.rb, line 67 def fold(*args) Fold.fold(*args) end
Apply padding to multiline text with ANSI codes
@see Strings::Pad#pad
@api public
# File lib/strings.rb, line 77 def pad(*args) Pad.pad(*args) end
Remove ANSI codes from the string
@see Strings::ANSI#sanitize
@api public
# File lib/strings.rb, line 87 def sanitize(string) ANSI.sanitize(string) end
Truncate a text at a given length
@see Strings::Truncate#truncate
@api public
# File lib/strings.rb, line 97 def truncate(*args) Truncate.truncate(*args) end
Wrap a text into lines at wrap length
@see Strings::Wrap#wrap
@api public
# File lib/strings.rb, line 107 def wrap(*args) Wrap.wrap(*args) end