Lines Matching refs:string
8 #include <string>
19 typedef std::pair<std::string, std::string> TokenValuePair;
22 // The maximum length of a cookie string we will try to parse
27 // Construct from a cookie string like "BLAH=1; path=/; domain=.google.com"
28 ParsedCookie(const std::string& cookie_line);
35 const std::string& Name() const { return pairs_[0].first; }
36 const std::string& Token() const { return Name(); }
37 const std::string& Value() const { return pairs_[0].second; }
40 const std::string& Path() const { return pairs_[path_index_].second; }
42 const std::string& Domain() const { return pairs_[domain_index_].second; }
44 const std::string& Expires() const { return pairs_[expires_index_].second; }
46 const std::string& MaxAge() const { return pairs_[maxage_index_].second; }
60 bool SetName(const std::string& name);
61 bool SetValue(const std::string& value);
62 bool SetPath(const std::string& path);
63 bool SetDomain(const std::string& domain);
64 bool SetExpires(const std::string& expires);
65 bool SetMaxAge(const std::string& maxage);
68 bool SetPriority(const std::string& priority);
71 std::string ToCookieLine() const;
74 // the given string.
75 static std::string::const_iterator FindFirstTerminator(const std::string& s);
77 // Given iterators pointing to the beginning and end of a string segment,
82 static bool ParseToken(std::string::const_iterator* it,
83 const std::string::const_iterator& end,
84 std::string::const_iterator* token_start,
85 std::string::const_iterator* token_end);
87 // Given iterators pointing to the beginning and end of a string segment,
91 static void ParseValue(std::string::const_iterator* it,
92 const std::string::const_iterator& end,
93 std::string::const_iterator* value_start,
94 std::string::const_iterator* value_end);
98 static std::string ParseTokenString(const std::string& token);
99 static std::string ParseValueString(const std::string& value);
102 void ParseTokenValuePairs(const std::string& cookie_line);
112 const std::string& key,
113 const std::string& value);
115 const std::string& key,
121 const std::string& key,
122 const std::string& value);