def _parse_string(data, start, stop_at_equals=False, must_have_content=False):
 if (start == len(data)):
  raise ParsingError(u'Expecting string, but found end of input!')
 char = data[start]
 if ((char == u'"') or (char == u"'")):
  (end, value) = _parse_quoted_string(data, start)
  has_content = True
 else:
  (end, value) = _parse_unquoted_string(data, start, stop_at_equals)
  has_content = (len(value) > 0)
 if (must_have_content and (not has_content)):
  raise ParsingError(u'String starting at {0} must be non-empty!'.format(_format_position(data, start)))
 next_is_equals = False
 if (stop_at_equals and ((end + 1) < len(data))):
  next_is_equals = (data[end] == u'=')
 return (end, value, next_is_equals)

def _parse_string ( data , start , stop_at_equals = False , must_have_content = False ) : if ( start == len ( data ) ) : raise ParsingError ( u'Expecting string, but found end of input!' ) char = data [ start ] if ( ( char == u'"' ) or ( char == u"'" ) ) : ( end , value ) = _parse_quoted_string ( data , start ) has_content = True else : ( end , value ) = _parse_unquoted_string ( data , start , stop_at_equals ) has_content = ( len ( value ) > 0 ) if ( must_have_content and ( not has_content ) ) : raise ParsingError ( u'String starting at {0} must be non-empty!' . format ( _format_position ( data , start ) ) ) next_is_equals = False if ( stop_at_equals and ( ( end + 1 ) < len ( data ) ) ) : next_is_equals = ( data [ end ] == u'=' ) return ( end , value , next_is_equals )
parse a string starting at position start in data .