From 22b831e358d4f68093b78225e6d046745a0c8e0a Mon Sep 17 00:00:00 2001 From: matz Date: Sat, 12 Feb 2005 10:57:22 +0000 Subject: * ext/etc/etc.c (Init_etc): sGroup needs HAVE_ST_GR_PASSWD check. [ruby-dev:25675] * misc/ruby-mode.el: [ruby-core:04415] * lib/rdoc/generators/html_generator.rb: [ruby-core:04412] * lib/rdoc/generators/ri_generator.rb: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@7953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- string.c | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'string.c') diff --git a/string.c b/string.c index 0f932a6b5..42fb4a0af 100644 --- a/string.c +++ b/string.c @@ -4531,14 +4531,15 @@ rb_str_justify(argc, argv, str, jflag) /* * call-seq: - * str.ljust(integer) => new_str + * str.ljust(integer, padstr=' ') => new_str * * If integer is greater than the length of str, returns a new * String of length integer with str left justified - * and space padded; otherwise, returns str. + * and padded with padstr; otherwise, returns str. * - * "hello".ljust(4) #=> "hello" - * "hello".ljust(20) #=> "hello " + * "hello".ljust(4) #=> "hello" + * "hello".ljust(20) #=> "hello " + * "hello".ljust(20, '1234') #=> "hello123412341234123" */ static VALUE @@ -4553,14 +4554,15 @@ rb_str_ljust(argc, argv, str) /* * call-seq: - * str.rjust(integer) => new_str + * str.rjust(integer, padstr=' ') => new_str * * If integer is greater than the length of str, returns a new * String of length integer with str right justified - * and space padded; otherwise, returns str. + * and padded with padstr; otherwise, returns str. * - * "hello".rjust(4) #=> "hello" - * "hello".rjust(20) #=> " hello" + * "hello".rjust(4) #=> "hello" + * "hello".rjust(20) #=> " hello" + * "hello".rjust(20, '1234') #=> "123412341234123hello" */ static VALUE @@ -4575,14 +4577,15 @@ rb_str_rjust(argc, argv, str) /* * call-seq: - * str.center(integer) => new_str + * str.center(integer, padstr) => new_str * * If integer is greater than the length of str, returns a new - * String of length integer with str centered - * between spaces; otherwise, returns str. + * String of length integer with str centered and + * padded with padstr; otherwise, returns str. * - * "hello".center(4) #=> "hello" - * "hello".center(20) #=> " hello " + * "hello".center(4) #=> "hello" + * "hello".center(20) #=> " hello " + * "hello".center(20, '123') #=> "1231231hello12312312" */ static VALUE -- cgit