MCPcopy Create free account
hub / github.com/aburch/simutrans / encode_URI

Function encode_URI

simworld.cc:5877–5891  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5875
5876
5877static void encode_URI(cbuffer_t& buf, char const* const text)
5878{
5879 for (char const* i = text; *i != '\0'; ++i) {
5880 char const c = *i;
5881 if (('A' <= c && c <= 'Z') ||
5882 ('a' <= c && c <= 'z') ||
5883 ('0' <= c && c <= '9') ||
5884 c == '-' || c == '.' || c == '_' || c == '~') {
5885 char const two[] = { c, '\0' };
5886 buf.append(two);
5887 } else {
5888 buf.printf("%%%02X", (unsigned char)c);
5889 }
5890 }
5891}
5892
5893
5894bool karte_t::interactive(uint32 quit_month)

Callers 1

announce_serverMethod · 0.85

Calls 2

printfMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected