MCPcopy Index your code
hub / github.com/benfry/processing4 / trim

Method trim

core/src/processing/core/PApplet.java:8285–8291  ·  view source on GitHub ↗

Removes whitespace characters from the beginning and end of a String. In addition to standard whitespace characters such as space, carriage return, and tab, this function also removes the Unicode "nbsp" (U+00A0) character and the zero width no-break space (U+FEFF) character. @webref data:string_fun

(String str)

Source from the content-addressed store, hash-verified

8283 * @see PApplet#join(String[], char)
8284 */
8285 static public String trim(String str) {
8286 if (str == null) {
8287 return null;
8288 }
8289 // remove nbsp *and* zero width no-break space
8290 return str.replace('\u00A0', ' ').replace('\uFEFF', ' ').trim();
8291 }
8292
8293
8294 /**

Callers 15

parsePathMethod · 0.95
parseColorsMethod · 0.95
parseFontMethod · 0.95
handleSettingsMethod · 0.95
loadTableMethod · 0.95
formatMethod · 0.95
parseMethod · 0.95
saveMethod · 0.95
trimMethod · 0.95
readSettingsMethod · 0.95
parseCategoriesMethod · 0.95
parseImportsMethod · 0.95

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected