MCPcopy Create free account
hub / github.com/bk138/multivnc / getQueryValue

Method getQueryValue

src/gui/MyFrameMain.cpp:1560–1578  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1558
1559
1560wxString MyFrameMain::getQueryValue(const wxURI& wxUri, const wxString& key) {
1561 wxString query = wxUri.GetQuery(); // Get everything after "?"
1562
1563 if (query.IsEmpty())
1564 return wxEmptyString;
1565
1566 // Split into key-value pairs
1567 wxStringTokenizer tokenizer(query, "&");
1568 while (tokenizer.HasMoreTokens())
1569 {
1570 wxString pair = tokenizer.GetNextToken();
1571 wxArrayString keyValue = wxSplit(pair, '=');
1572 if (keyValue.size() == 2 && keyValue[0] == key)
1573 {
1574 return keyValue[1];
1575 }
1576 }
1577 return wxEmptyString; // Key not found
1578}
1579
1580
1581/*

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected