--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Returns <em>n</em> characters of the string. If <em>n</em> is positive the characters are from the beginning of the string. If <em>n</em> is negative from the end of the string.
- !ruby/struct:SM::Flow::P 
  body: Alternatively a replacement string can be given, which will replace the <em>n</em> characters.
- !ruby/struct:SM::Flow::VERB 
  body: "   str = &quot;this is text&quot;\n   str.nchar(4)            #=&gt; &quot;this&quot;\n   str.nchar(4, 'that')    #=&gt; &quot;that&quot;\n   str                     #=&gt; &quot;that is text&quot;\n"
full_name: String#nchar
is_singleton: false
name: nchar
params: (n, replacement=nil)
visibility: public
