Lines Matching refs:string
30 * $FreeBSD: releng/11.0/usr.bin/dtc/string.hh 289935 2015-10-25 14:52:16Z theraven $
36 #include <string>
46 * and store in collections. Copying the string object does not copy the
51 class string
53 friend std::hash<string>;
57 /** length of the string. DTS strings are allowed to contain nuls */
62 static string parse(input_buffer &s);
65 * Constructs a string referring into another buffer.
67 string(const char *s, int l) : start(s), length(l) {}
68 /** Constructs a string from a C string. */
69 string(const char *s) : start(s), length(strlen(s)) {}
70 /** Default constructor, returns an empty string. */
71 string() : start(0), length(0) {}
73 string(input_buffer &s);
75 * Returns the longest string in the input buffer starting at the
79 static string parse_node_name(input_buffer &s);
81 * Returns the longest string in the input buffer starting at the
85 static string parse_property_name(input_buffer &s);
92 static string parse_node_or_property_name(input_buffer &s,
98 bool operator==(const string& other) const;
100 * Compares a string against a C string. The trailing nul in the C
101 * string is ignored for the purpose of comparison, so this will always
102 * fail if the string contains nul bytes.
118 bool operator<(const string& other) const;
120 * Returns true if this is the empty string, false otherwise.
127 * Returns the size of the string, in bytes.
134 * Writes the string to the specified buffer.
138 * Prints the string to the specified output stream.
142 * Dumps the string to the standard error stream. Intended to be used
152 struct hash<dtc::string>
154 std::size_t operator()(dtc::string const& s) const
156 std::string str(s.start, s.length);
157 std::hash<std::string> h;