D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
String
/
Filename :
center-i.ri
back
Copy
U:RDoc::AnyMethod[iI"center:ETI"String#center;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"'Returns a centered copy of +self+.;To:RDoc::Markup::BlankLine o; ; [I"TIf integer argument +size+ is greater than the size (in characters) of +self+, ;TI"Ereturns a new string of length +size+ that is a copy of +self+, ;TI"8centered and padded on both ends with +pad_string+:;T@o:RDoc::Markup::Verbatim; [ I"0'hello'.center(10) # => " hello " ;TI"0' hello'.center(10) # => " hello " ;TI"0'hello'.center(10, 'ab') # => "abhelloaba" ;TI"8'тест'.center(10) # => " тест " ;TI"A'こんにちは'.center(10) # => " こんにちは " ;T:@format0o; ; [I"PIf +size+ is not greater than the size of +self+, returns a copy of +self+:;T@o;; [I"%'hello'.center(5) # => "hello" ;TI"%'hello'.center(1) # => "hello" ;T; 0o; ; [I")Related: String#ljust, String#rjust.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"2center(size, pad_string = ' ') -> new_string ;T0[ I"(*args);T@%FI"String;TcRDoc::NormalClass00