MCPcopy Create free account
hub / github.com/benfry/processing4 / fromString

Method fromString

app/src/processing/app/syntax/SyntaxStyle.java:37–49  ·  view source on GitHub ↗
(String str)

Source from the content-addressed store, hash-verified

35
36
37 static public SyntaxStyle fromString(String str) {
38 StringTokenizer st = new StringTokenizer(str, ",");
39
40 String s = st.nextToken();
41 if (s.indexOf("#") == 0) s = s.substring(1);
42 Color color = new Color(Integer.parseInt(s, 16));
43
44 s = st.nextToken();
45 boolean bold = s.contains("bold");
46 //boolean italic = s.contains("italic");
47
48 return new SyntaxStyle(color, bold);
49 }
50
51
52 /** Returns the color specified in this style. */

Callers 2

getStyleMethod · 0.95
getProcessingTempMethod · 0.45

Calls 2

parseIntMethod · 0.80
containsMethod · 0.45

Tested by

no test coverage detected