(
			self,
			n,
			fail_value='',
			isprint_only_with_space_padding=False)
Extract a single fixed length C string from the binary file at the current file position, returns a single C string
Extract a single fixed length C string from the binary file at the current file position, returns a single C string
Extract a single fixed length C string from the binary file at the current file position returns a single C string
def get_fixed_length_c_string(
			self,
			n,
			fail_value='',
			isprint_only_with_space_padding=False):
		'''Extract a single fixed length C string from the binary file at the current file position, returns a single C string'''
		s = self.read_size(n)
		if s:
			cstr, = struct.unpack(self.byte_order + ("%i" % n) + 's', s)
			# Strip trialing NULLs
			cstr = cstr.decode()
			cstr = cstr.strip("\0")
			if isprint_only_with_space_padding:
				for c in cstr:
					if c in string.printable or ord(c) == 0:
						continue
					return fail_value
			return cstr
		else:
			return fail_value
def get_fixed_length_c_string ( self , n , fail_value = '' , isprint_only_with_space_padding = False ) : s = self . read_size ( n ) if s : cstr , = struct . unpack ( self . byte_order + ( "%i" % n ) + 's' , s ) # Strip trialing NULLs cstr = cstr . decode ( ) cstr = cstr . strip ( "\0" ) if isprint_only_with_space_padding : for c in cstr : if c in string . printable or ord ( c ) == 0 : continue return fail_value return cstr else : return fail_value