Lines Matching refs:string
73 inline bool SeekTo(std::string::const_iterator* it,
74 const std::string::const_iterator& end,
81 inline bool SeekPast(std::string::const_iterator* it,
82 const std::string::const_iterator& end,
87 inline bool SeekBackPast(std::string::const_iterator* it,
88 const std::string::const_iterator& end,
96 bool IsValidToken(const std::string& value) {
101 std::string separators = "()<>@,;:\\\"/[]?={} \t";
102 if (value.find_first_of(separators) != std::string::npos)
106 for (std::string::const_iterator i = value.begin(); i != value.end(); ++i) {
120 bool IsValidCookieValue(const std::string& value) {
121 // Number of characters to skip in validation at beginning and end of string.
125 for (std::string::const_iterator i = value.begin() + skip;
143 bool IsValidCookieAttributeValue(const std::string& value) {
146 for (std::string::const_iterator i = value.begin(); i != value.end(); ++i) {
157 ParsedCookie::ParsedCookie(const std::string& cookie_line)
188 bool ParsedCookie::SetName(const std::string& name) {
197 bool ParsedCookie::SetValue(const std::string& value) {
206 bool ParsedCookie::SetPath(const std::string& path) {
210 bool ParsedCookie::SetDomain(const std::string& domain) {
214 bool ParsedCookie::SetExpires(const std::string& expires) {
218 bool ParsedCookie::SetMaxAge(const std::string& maxage) {
230 bool ParsedCookie::SetPriority(const std::string& priority) {
234 std::string ParsedCookie::ToCookieLine() const {
235 std::string out;
249 std::string::const_iterator ParsedCookie::FindFirstTerminator(
250 const std::string& s) {
251 std::string::const_iterator end = s.end();
253 s.find_first_of(std::string(kTerminator, kTerminatorLen));
254 if (term_pos != std::string::npos) {
255 // We found a character we should treat as an end of string.
261 bool ParsedCookie::ParseToken(std::string::const_iterator* it,
262 const std::string::const_iterator& end,
263 std::string::const_iterator* token_start,
264 std::string::const_iterator* token_end) {
266 std::string::const_iterator token_real_end;
297 void ParsedCookie::ParseValue(std::string::const_iterator* it,
298 const std::string::const_iterator& end,
299 std::string::const_iterator* value_start,
300 std::string::const_iterator* value_end) {
323 std::string ParsedCookie::ParseTokenString(const std::string& token) {
324 std::string::const_iterator it = token.begin();
325 std::string::const_iterator end = FindFirstTerminator(token);
327 std::string::const_iterator token_start, token_end;
329 return std::string(token_start, token_end);
330 return std::string();
333 std::string ParsedCookie::ParseValueString(const std::string& value) {
334 std::string::const_iterator it = value.begin();
335 std::string::const_iterator end = FindFirstTerminator(value);
337 std::string::const_iterator value_start, value_end;
339 return std::string(value_start, value_end);
343 void ParsedCookie::ParseTokenValuePairs(const std::string& cookie_line) {
348 std::string::const_iterator start = cookie_line.begin();
349 std::string::const_iterator it = start;
353 std::string::const_iterator end = FindFirstTerminator(cookie_line);
358 std::string::const_iterator token_start, token_end;
377 pair.first = std::string(token_start, token_end);
381 pair.first = std::string(token_start, token_end);
386 std::string::const_iterator value_start, value_end;
390 pair.second = std::string(value_start, value_end);
406 // the string or a ValueSeparator like ';', which we want to skip.
442 const std::string& key,
443 const std::string& value) {
453 const std::string& key,
459 return SetAttributePair(index, key, std::string());
464 const std::string& key,
465 const std::string& value) {