MCPcopy Create free account
hub / github.com/M66B/FairEmail / trim

Method trim

app/src/main/java/eu/faircode/email/Helper.java:2845–2858  ·  view source on GitHub ↗
(String value, String chars)

Source from the content-addressed store, hash-verified

2843 }
2844
2845 static String trim(String value, String chars) {
2846 if (value == null)
2847 return null;
2848
2849 for (Character kar : chars.toCharArray()) {
2850 String k = kar.toString();
2851 while (value.startsWith(k))
2852 value = value.substring(1);
2853 while (value.endsWith(k))
2854 value = value.substring(0, value.length() - 1);
2855 }
2856
2857 return value;
2858 }
2859
2860 static String limit(String value, int max) {
2861 if (TextUtils.isEmpty(value) || value.length() < max)

Callers 15

getDataMethod · 0.95
onClickMethod · 0.80
onAuthorizedMethod · 0.80
onExecuteMethod · 0.80
onSaveMethod · 0.80
onExecuteMethod · 0.80
getDataUriStreamMethod · 0.80
onClickMethod · 0.80
onClickMethod · 0.80
ensureSuffixListMethod · 0.80
processWordMethod · 0.80
getParagraphsMethod · 0.80

Calls 2

toStringMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected