本文整理汇总了C++中SubscriberRegistry::stringToUint方法的典型用法代码示例。如果您正苦于以下问题:C++ SubscriberRegistry::stringToUint方法的具体用法?C++ SubscriberRegistry::stringToUint怎么用?C++ SubscriberRegistry::stringToUint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SubscriberRegistry
的用法示例。
在下文中一共展示了SubscriberRegistry::stringToUint方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: foo
void foo(string s)
{
uint64_t h;
uint64_t l;
sr.stringToUint(s, &h, &l);
LOG(INFO) << sr.uintToString(h, l) << " " << s;
}
示例2: randEqual
bool randEqual(string a, string b)
{
uint64_t rand1h = 0;
uint64_t rand1l = 0;
uint64_t rand2h = 0;
uint64_t rand2l = 0;
if (a.empty() || b.empty())
return false;
gSubscriberRegistry.stringToUint(a, &rand1h, &rand1l);
gSubscriberRegistry.stringToUint(b, &rand2h, &rand2l);
LOG(DEBUG) << "rand1h = " << rand1h << ", rand1l = " << rand1l;
LOG(DEBUG) << "rand2h = " << rand2h << ", rand2l = " << rand2l;
return (rand1h == rand2h) && (rand1l == rand2l);
}