bool getShardId(folly::StringPiece key, folly::StringPiece& shardId) {
  size_t colon = qfind(key, ':');
  if (colon == std::string::npos) {
    return false;
  }
  key.advance(colon + 1);
  colon = qfind(key, ':');
  if (colon == std::string::npos) {
    return false;
  }
  if (colon <= 0 || !isdigit(key[colon - 1])) {
    return false;
  }
  shardId = key.subpiece(0, colon);
  return true;
}
Exemple #2
0
void MaxQTextDocument::link(QTextDocument * doc) {
	BBObject * handle = qfind(doc);
	
	if (handle == &bbNullObject) {
		MaxQTextDocument * document = new MaxQTextDocument(doc);
	}
}