21 if (txt.length() >= 1) {
32 size_t mid = txt.find(
":/");
33 if (mid != std::string::npos && mid > 0) {
34 std::string first = txt.substr(0, mid);
35 std::string second = txt.substr(mid + 2);
36 if (first.length() >= 2) {
37 if (first[0] ==
'/') {
38 first = first.substr(1);
41 return Contact(second, first,
"", -1);
43 return Contact(txt,
"",
"", -1);
50 std::string work = txt;
51 size_t mid = work.find(
":/");
52 if (mid != std::string::npos && mid > 0) {
53 work = work.substr(0, mid);
54 std::string target = std::string(
"+") + mod +
".";
55 size_t modLoc = work.find(target);
56 if (modLoc != std::string::npos) {
57 work = work.substr(modLoc + target.length(), work.length());
58 size_t endLoc = work.find(
'+');
59 if (endLoc != std::string::npos) {
60 work = work.substr(0, endLoc);
65 if (hasModifier !=
nullptr) {
68 return ok ? work :
"";