Sha256: 7aca795cfd3650620bd794b216b53e4be513e1faa5ba03fd18d31886ad80db9d
Contents?: true
Size: 735 Bytes
Versions: 15
Compression:
Stored size: 735 Bytes
Contents
package com.moode.sms.utils; public class StringUtils { public static boolean isEmpty(String value) { return value == null || "".equals(value.trim()); } public static boolean isNotEmpty(String value) { return !isEmpty(value); } public static String trimQuote(String value) { if (isEmpty(value)) return null; return value.replaceAll("(^\'|\")|(\'|\"$)", ""); } public static boolean isSamePhone(String originatingAddress, String savedPhone) { return trimCountryCode(originatingAddress).equalsIgnoreCase(savedPhone); } public static String trimCountryCode(String originatingAddress) { return originatingAddress.replaceAll("(^\\+86)", ""); } }
Version data entries
15 entries across 15 versions & 1 rubygems