Method: PSD::File#read_string

Defined in:
lib/psd/file.rb

#read_string(length = nil) ⇒ Object

Reads a string of the given length and converts it to UTF-8 from the internally used MacRoman encoding.



73
74
75
76
# File 'lib/psd/file.rb', line 73

def read_string(length=nil)
  length = @file.read(1).bytes.to_a[0] if length.nil?
  read(length).delete("\000")
end