cn.hutool.core.util.StrUtil.endWithIgnoreCase()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(5.1k)|赞(0)|评价(0)|浏览(322)

本文整理了Java中cn.hutool.core.util.StrUtil.endWithIgnoreCase()方法的一些代码示例,展示了StrUtil.endWithIgnoreCase()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。StrUtil.endWithIgnoreCase()方法的具体详情如下:
包路径:cn.hutool.core.util.StrUtil
类名称:StrUtil
方法名:endWithIgnoreCase

StrUtil.endWithIgnoreCase介绍

[英]是否以指定字符串结尾,忽略大小写
[中]是否以指定字符串结尾,忽略大小写

代码示例

代码示例来源:origin: looly/hutool

/**
 * 构造
 * 
 * @param destFile 目标文件,可以不存在
 * @param sheetName sheet名,做为第一个sheet名并写出到此sheet,例如sheet1
 */
public ExcelWriter(File destFile, String sheetName) {
  this(destFile.exists() ? WorkbookUtil.createBook(FileUtil.getInputStream(destFile), true) : WorkbookUtil.createBook(StrUtil.endWithIgnoreCase(destFile.getName(), ".xlsx")), sheetName);
  this.destFile = destFile;
}

代码示例来源:origin: looly/hutool

/**
 * 构造
 * 
 * @param destFile 目标文件,可以不存在
 * @param sheetName sheet名,做为第一个sheet名并写出到此sheet,例如sheet1
 */
public ExcelWriter(File destFile, String sheetName) {
  this(destFile.exists() ? WorkbookUtil.createBook(FileUtil.getInputStream(destFile), true) : WorkbookUtil.createBook(StrUtil.endWithIgnoreCase(destFile.getName(), ".xlsx")), sheetName);
  this.destFile = destFile;
}

代码示例来源:origin: looly/hutool

/**
 * 去除两边的指定字符串,忽略大小写
 * 
 * @param str 被处理的字符串
 * @param prefix 前缀
 * @param suffix 后缀
 * @return 处理后的字符串
 * @since 3.1.2
 */
public static String stripIgnoreCase(CharSequence str, CharSequence prefix, CharSequence suffix) {
  if (isEmpty(str)) {
    return str(str);
  }
  int from = 0;
  int to = str.length();
  String str2 = str.toString();
  if (startWithIgnoreCase(str2, prefix)) {
    from = prefix.length();
  }
  if (endWithIgnoreCase(str2, suffix)) {
    to -= suffix.length();
  }
  return str2.substring(from, to);
}

代码示例来源:origin: looly/hutool

/**
 * 去除两边的指定字符串,忽略大小写
 * 
 * @param str 被处理的字符串
 * @param prefix 前缀
 * @param suffix 后缀
 * @return 处理后的字符串
 * @since 3.1.2
 */
public static String stripIgnoreCase(CharSequence str, CharSequence prefix, CharSequence suffix) {
  if (isEmpty(str)) {
    return str(str);
  }
  int from = 0;
  int to = str.length();
  String str2 = str.toString();
  if (startWithIgnoreCase(str2, prefix)) {
    from = prefix.length();
  }
  if (endWithIgnoreCase(str2, suffix)) {
    to -= suffix.length();
  }
  return str2.substring(from, to);
}

代码示例来源:origin: looly/hutool

final String lastPathEleStr = lastPathEle.toString();
if(StrUtil.contains(lastPathEleStr, StrUtil.C_DOT) && false ==StrUtil.endWithIgnoreCase(lastPathEleStr, ".d")) {
  this.filePath = this.path;
  this.path = this.filePath.getParent();

代码示例来源:origin: looly/hutool

final String lastPathEleStr = lastPathEle.toString();
if(StrUtil.contains(lastPathEleStr, StrUtil.C_DOT) && false ==StrUtil.endWithIgnoreCase(lastPathEleStr, ".d")) {
  this.filePath = this.path;
  this.path = this.filePath.getParent();

代码示例来源:origin: looly/hutool

if (isOracle && value instanceof String && StrUtil.endWithIgnoreCase((String) value, ".nextval")) {

代码示例来源:origin: looly/hutool

if (isOracle && value instanceof String && StrUtil.endWithIgnoreCase((String) value, ".nextval")) {

代码示例来源:origin: Exrick/x-boot

public static String mapToString(Map<String, String[]> paramMap){
  if (paramMap == null) {
    return "";
  }
  Map<String, Object> params = new HashMap<>(16);
  for (Map.Entry<String, String[]> param : paramMap.entrySet()) {
    String key = param.getKey();
    String paramValue = (param.getValue() != null && param.getValue().length > 0 ? param.getValue()[0] : "");
    String obj = StrUtil.endWithIgnoreCase(param.getKey(), "password") ? "你是看不见我的" : paramValue;
    params.put(key,obj);
  }
  return new Gson().toJson(params);
}

代码示例来源:origin: cn.hutool/hutool-all

/**
 * 构造
 * 
 * @param destFile 目标文件,可以不存在
 * @param sheetName sheet名,做为第一个sheet名并写出到此sheet,例如sheet1
 */
public ExcelWriter(File destFile, String sheetName) {
  this(destFile.exists() ? WorkbookUtil.createBook(FileUtil.getInputStream(destFile), true) : WorkbookUtil.createBook(StrUtil.endWithIgnoreCase(destFile.getName(), ".xlsx")), sheetName);
  this.destFile = destFile;
}

代码示例来源:origin: cn.hutool/hutool-all

/**
 * 去除两边的指定字符串,忽略大小写
 * 
 * @param str 被处理的字符串
 * @param prefix 前缀
 * @param suffix 后缀
 * @return 处理后的字符串
 * @since 3.1.2
 */
public static String stripIgnoreCase(CharSequence str, CharSequence prefix, CharSequence suffix) {
  if (isEmpty(str)) {
    return str(str);
  }
  int from = 0;
  int to = str.length();
  String str2 = str.toString();
  if (startWithIgnoreCase(str2, prefix)) {
    from = prefix.length();
  }
  if (endWithIgnoreCase(str2, suffix)) {
    to -= suffix.length();
  }
  return str2.substring(from, to);
}

代码示例来源:origin: cn.hutool/hutool-all

final String lastPathEleStr = lastPathEle.toString();
if(StrUtil.contains(lastPathEleStr, StrUtil.C_DOT) && false ==StrUtil.endWithIgnoreCase(lastPathEleStr, ".d")) {
  this.filePath = this.path;
  this.path = this.filePath.getParent();

代码示例来源:origin: cn.hutool/hutool-db

if (isOracle && value instanceof String && StrUtil.endWithIgnoreCase((String) value, ".nextval")) {

代码示例来源:origin: cn.hutool/hutool-all

if (isOracle && value instanceof String && StrUtil.endWithIgnoreCase((String) value, ".nextval")) {

代码示例来源:origin: cn.hutool/hutool-db

if (StrUtil.endWithIgnoreCase(valueStr, "null")) {
  if (StrUtil.equalsIgnoreCase("= null", valueStr) || StrUtil.equalsIgnoreCase("is null", valueStr)) {

代码示例来源:origin: cn.hutool/hutool-all

if (StrUtil.endWithIgnoreCase(valueStr, "null")) {
  if (StrUtil.equalsIgnoreCase("= null", valueStr) || StrUtil.equalsIgnoreCase("is null", valueStr)) {

相关文章

微信公众号

最新文章

更多

StrUtil类方法