Commit 6c101c12 by zhengnw@sobot.com

utils 1.1.3 添加 isNoEmpty

parent 335d6fe5
......@@ -12,7 +12,7 @@ android {
//这里就是打jar包
task makeJar(type: Copy) {
//删除旧的jar包
delete 'build/libs/sobot_utils_1.1.2.jar'
delete 'build/libs/sobot_utils_1.1.3.jar'
//原地址
from('build/intermediates/packaged-classes/release/')
//导出jar包的地址
......@@ -20,7 +20,7 @@ android {
//包含的jar包
include('classes.jar')
//重命名jar包为mysdk
rename ('classes.jar', 'sobot_utils_1.1.2.jar')
rename ('classes.jar', 'sobot_utils_1.1.3.jar')
}
makeJar.dependsOn(build)
......
......@@ -12,7 +12,7 @@ task androidSourcesJar(type: Jar) {
ext {
PUBLISH_GROUP_ID = "com.sobot.library" //项目包名
PUBLISH_ARTIFACT_ID = 'utils' //项目名
PUBLISH_VERSION = '1.1.2' //版本号
PUBLISH_VERSION = '1.1.3' //版本号
}
......
......@@ -30,6 +30,15 @@ public final class SobotStringUtils {
}
}
//检查字符串是否不为空
public static boolean isNoEmpty(String str) {
if (TextUtils.isEmpty(str) || "null".equals(str) || "NULL".equals(str)) {
return false;
} else {
return true;
}
}
//检查字符串为空的情况,如果是空,返回 “”
public static String checkStringIsNull(String str) {
if (TextUtils.isEmpty(str) || "null".equals(str) || "NULL".equals(str)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment