Code Monkey home page Code Monkey logo

checkallutilsdemo's Introduction

CheckAllUtilsDemo

使用情况 方法 返回结果
验证手机格式是否正确 isMobileNO(String mobiles) true:正确
验证邮箱格式是否正确 isEmailAdd(String email) true:正确
判断是否有网络连接 isNetworkConnected(Context context) true:有网络连接
判断WIFI网络是否可用 isWifiConnected(Context context) true:wifi可用
判断MOBILE网络是否可用 isMobileConnected(Context context) true:mobile网络可用
判断网络类型 isMobileConnected(Context context) -1:没有网络,1:WIFI网络,2:wap网络,3:net网络
判断服务是否运行 isServiceRunning(Context mContext, String className) true:在运行
判断apk是否安装 checkApkExist(Context context, String packageName) true:已安装
判断sd卡是否可以用 sdCardExists() true:可用
判断一个文件是否存在 isFileExists(String path) true:存在
判断当前应用程序处于前台还是后台 isBackground(Context context) true:后台,false:前台
判断字符串是否为空 isNotNull(String string) true:非空
判断字符串是否为空和是否等于"" isNotNull2(String string) true:非空且不等于""
判断字符串是否为数字 isNumber(String number) true:为数字
判断字符串是否为带小数的数字 isDecimal(String number) true:为带小数数字
判断字符串是否为字母 isLetter(String letter) true:为字母
判断字符串是否含有汉字 hasChinese(String str) true:含有汉字
判断数字是奇数还是偶数 isEvenNumbers(String even) 2:偶数,1:奇数,0:不是基数也不是偶数
判断字符串是否字母开头 isLetterBegin(String s) true:为字母开头
判断字符串是否以指定内容开头 startWithMytext(String mytext, String begin) 第一个参数为需要判断的字符串,第二个参数为指定的内容
判断字符串是否以指定内容结尾 endWithMytext(String mytext, String end) 第一个参数为需要判断的字符串,第二个参数为指定的内容
判断字符串中是否含有指定内容 hasMytext(String string, String mytext) 第一个参数为需要判断的字符串,第二个参数为指定的内容

checkallutilsdemo's People

Contributors

czhchenzihao avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.