mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-17 22:23:10 +03:00
PGP Digital signature verifier class
This commit is contained in:
committed by
Federico Fissore
parent
8c49ee4206
commit
183c386e8c
@ -26,4 +26,18 @@ public class StringUtils {
|
||||
String regex = pattern.replace("?", ".?").replace("*", ".*?");
|
||||
return input.matches(regex);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the string without trailing whitespace characters
|
||||
*
|
||||
* @param s
|
||||
* @return
|
||||
*/
|
||||
public static String rtrim(String s) {
|
||||
int i = s.length() - 1;
|
||||
while (i >= 0 && Character.isWhitespace(s.charAt(i))) {
|
||||
i--;
|
||||
}
|
||||
return s.substring(0, i + 1);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user