MCPcopy Create free account
hub / github.com/demoth/jake2 / Info_ValueForKey

Method Info_ValueForKey

qcommon/src/main/java/jake2/qcommon/Info.java:34–52  ·  view source on GitHub ↗

Returns a value for a key from an info string.

(String s, String key)

Source from the content-addressed store, hash-verified

32 * Returns a value for a key from an info string.
33 */
34 public static String Info_ValueForKey(String s, String key) {
35
36 StringTokenizer tk = new StringTokenizer(s, "\\");
37
38 while (tk.hasMoreTokens()) {
39 String key1 = tk.nextToken();
40
41 if (!tk.hasMoreTokens()) {
42 Com.Printf("MISSING VALUE\n");
43 return s;
44 }
45 String value1 = tk.nextToken();
46
47 if (key.equals(key1))
48 return value1;
49 }
50
51 return "";
52 }
53
54 /**
55 * Sets a value for a key in the user info string.

Callers 9

spectatorRespawnMethod · 0.95
PutClientInServerMethod · 0.95
ClientUserinfoChangedMethod · 0.95
ClientConnectMethod · 0.95
IsFemaleMethod · 0.95
IsNeutralMethod · 0.95
ClientTeamMethod · 0.95
gotnewclMethod · 0.95
SV_UserinfoChangedMethod · 0.95

Calls 2

PrintfMethod · 0.95
equalsMethod · 0.45

Tested by

no test coverage detected