Skip to content
instance method

String#to_str

() -> ::String
to_str

Alias of #to_s

Returns self if self is a String, or self converted to a String if self is a subclass of String.

Related: see Converting to New String.

See also #to_s #to_sym #to_r #tr also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0