* trim spaces characters properly
This commit is contained in:
parent
f1c2b9fe91
commit
2fa9b625fa
|
@ -50,7 +50,7 @@ String.metaClass.replaceAll = { String pattern -> replaceAll(pattern, "") }
|
||||||
*
|
*
|
||||||
* e.g. "Doctor Who" -> "Doctor_Who"
|
* e.g. "Doctor Who" -> "Doctor_Who"
|
||||||
*/
|
*/
|
||||||
String.metaClass.space = { replacement -> replaceAll(/[:?._\s]+/, replacement) }
|
String.metaClass.space = { replacement -> replaceAll(/[:?._]/, " ").trim().replaceAll(/\s+/, replacement) }
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue