ios.write(string) â integer
Instance Public methods
Writes the given string to ios. The stream must be opened for
writing. If the argument is not a string, it will be converted to a string
using to_s
. Returns the number of bytes written.
1 2 | count = $stdout .write( "This is a test\n" ) puts "That was #{count} bytes of data" |
produces:
1 2 | This is a test That was 15 bytes of data |
Please login to continue.