<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      一些常用的字符串處理方法

      在工作過程中發(fā)現(xiàn)經(jīng)常需要對某些字符串進(jìn)行處理,所以就封裝了加一些常用的

      package com.dbyl.libarary.utils;
      
      import java.util.regex.Matcher;
      import java.util.regex.Pattern;
      
      public class StringUtils {
          /**
           * This method is for judge the string null or not null
           * 
           * @author Young
           * @param str
           * @return
           */
          public static boolean isNull(String str) {
              return (str == null ? true : false);
          }
      
          /**
           * This method is for judge the string is empty or not
           * 
           * @author Young
           * @param str
           * @return
           */
          public static boolean isEmpty(String str) {
              return (str.equals("") ? true : false);
          }
      
          /**
           * This method is for judge null or empty
           * 
           * @author Young
           * @param str
           * @return
           */
          public static boolean isNullOrEmpty(String str) {
              return (isNull(str) || isEmpty(str));
          }
      
          /**
           * This method is for get the matcher string
           * 
           * @author Young
           * @param source
           * @param rex
           * @return
           */
          public static String getMatch(String source, String rex) {
              Pattern pattern = Pattern.compile(rex);
              Matcher matcher = pattern.matcher(source);
              if (matcher.find()) {
                  return source.substring(matcher.start(), matcher.end());
              }
              return null;
      
          }
      
          /**
           * get the match group
           * 
           * @author Young
           * @param source
           * @param rex
           * @param groupIndex
           * @return
           */
          public static String getMatchGroup(String source, String rex, int groupIndex) {
              Pattern pattern = Pattern.compile(rex);
              Matcher matcher = pattern.matcher(source);
              if (matcher.find()) {
                  return matcher.group(groupIndex);
              }
              return null;
      
          }
      
          /**
           * This method is for replaceAll the string
           * 
           * @author Young
           * @param source
           * @param rex
           * @param replaceBy
           */
          public static void replaceAll(String source, String rex, String replaceBy) {
              Pattern pattern = Pattern.compile(rex);
              Matcher matcher = pattern.matcher(source);
              if (matcher.find()) {
                  matcher.replaceAll(replaceBy);
              }
          }
      
          /**
           * This method is for judge is match 
           * @author Young
           * @param source
           * @param rex
           * @return
           */
          public static boolean isMatch(String source, String rex) {
              Pattern pattern = Pattern.compile(rex);
              Matcher matcher = pattern.matcher(source);
              return matcher.matches();
          }
      }

       

      posted @ 2016-02-21 17:26  to be crazy  閱讀(713)  評論(0)    收藏  舉報
      主站蜘蛛池模板: 国产suv精品一区二区五| 国产亚洲精品久久777777| 国产精品自拍中文字幕| 色欲AV无码一区二区人妻| 日韩精品国产二区三区| 亚洲欧美国产免费综合视频| 亚洲国产无套无码av电影| 亚洲国产精品综合久久网各| 在线观看亚洲精品国产| 和艳妇在厨房好爽在线观看 | 成人午夜福利一区二区四区| 国产 另类 在线 欧美日韩 | 丁香婷婷色综合激情五月| 内射老妇bbwx0c0ck| 国产一区二区午夜福利久久| 亚洲高清国产自产拍av| 伊人久久精品无码麻豆一区 | 国产精品综合av一区二区国产馆 | 久久人人97超碰人人澡爱香蕉| 鲁一鲁一鲁一鲁一澡| 国产精品十八禁在线观看| 精品国产免费一区二区三区香蕉| 久久人妻公开中文字幕| 国产亚洲无线码一区二区| 欧洲性开放老太大| 67194熟妇在线观看线路| 永久免费在线观看蜜桃视频| AV免费网址在线观看| 欧美巨大极度另类| 国产精品视频一区二区不卡| 国产精品v欧美精品∨日韩| 欧美成人无码a区视频在线观看 | 中文字幕一区日韩精品| 欧美一区二区三区欧美日韩亚洲| 日本中文字幕有码在线视频 | 色综合视频一区二区三区| 日韩精品一区二区三区在| 我和亲妺妺乱的性视频| 亚洲综合欧美在线…| 国产精品自在线拍国产手机版| 钟祥市|