diff options
| author | BurdetteLamar <burdettelamar@yahoo.com> | 2025-10-13 17:33:03 +0100 |
|---|---|---|
| committer | Peter Zhu <peter@peterzhu.ca> | 2025-10-13 18:14:57 -0400 |
| commit | 25821f3438fda08b54c7ff1702f0c87ffe6e7217 (patch) | |
| tree | 9d7d0f1e6a6501bac9fd1a72de6f13e551059456 | |
| parent | 53ca9fbb4c9a307379b0647130564f2ef3ad07c7 (diff) | |
[DOC] Tweaks for String#rjust
| -rw-r--r-- | doc/string/rjust.rdoc | 6 | ||||
| -rw-r--r-- | string.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/doc/string/rjust.rdoc b/doc/string/rjust.rdoc index 39e490b7cc..864cfcce7a 100644 --- a/doc/string/rjust.rdoc +++ b/doc/string/rjust.rdoc @@ -1,7 +1,7 @@ Returns a right-justified copy of +self+. -If integer argument +size+ is greater than the size (in characters) of +self+, -returns a new string of length +size+ that is a copy of +self+, +If integer argument +width+ is greater than the size (in characters) of +self+, +returns a new string of length +width+ that is a copy of +self+, right justified and padded on the left with +pad_string+: 'hello'.rjust(10) # => " hello" @@ -10,7 +10,7 @@ right justified and padded on the left with +pad_string+: 'тест'.rjust(10) # => " тест" 'こんにちは'.rjust(10) # => " こんにちは" -If +size+ is not greater than the size of +self+, returns a copy of +self+: +If <tt>width <= self.size</tt>, returns a copy of +self+: 'hello'.rjust(5, 'ab') # => "hello" 'hello'.rjust(1, 'ab') # => "hello" @@ -11177,7 +11177,7 @@ rb_str_ljust(int argc, VALUE *argv, VALUE str) /* * call-seq: - * rjust(size, pad_string = ' ') -> new_string + * rjust(width, pad_string = ' ') -> new_string * * :include: doc/string/rjust.rdoc * |
