java.lang.String.foldCase()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(6.6k)|赞(0)|评价(0)|浏览(112)

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

String.foldCase介绍

[英]This isn't equivalent to either of ICU's u_foldCase case folds, and thus any of the Unicode case folds, but it's what the RI uses.
[中]这并不等同于ICU的u_foldCase案例折叠,因此也不等同于任何Unicode案例折叠,但这是RI使用的。

代码示例

代码示例来源:origin: robovm/robovm

continue;
c1 = foldCase(c1);
c2 = foldCase(c2);
if ((result = c1 - c2) != 0) {
  return result;

代码示例来源:origin: robovm/robovm

/**
 * Compares the specified string to this string ignoring the case of the
 * characters and returns true if they are equal.
 *
 * @param string
 *            the string to compare.
 * @return {@code true} if the specified string is equal to this string,
 *         {@code false} otherwise.
 */
@FindBugsSuppressWarnings("ES_COMPARING_PARAMETER_STRING_WITH_EQ")
public boolean equalsIgnoreCase(String string) {
  if (string == this) {
    return true;
  }
  if (string == null || count != string.count) {
    return false;
  }
  int o1 = offset, o2 = string.offset;
  int end = offset + count;
  char[] target = string.value;
  while (o1 < end) {
    char c1 = value[o1++];
    char c2 = target[o2++];
    if (c1 != c2 && foldCase(c1) != foldCase(c2)) {
      return false;
    }
  }
  return true;
}

代码示例来源:origin: robovm/robovm

char c1 = value[thisStart++];
char c2 = target[start++];
if (c1 != c2 && foldCase(c1) != foldCase(c2)) {
  return false;

代码示例来源:origin: MobiVM/robovm

continue;
c1 = foldCase(c1);
c2 = foldCase(c2);
if ((result = c1 - c2) != 0) {
  return result;

代码示例来源:origin: com.gluonhq/robovm-rt

continue;
c1 = foldCase(c1);
c2 = foldCase(c2);
if ((result = c1 - c2) != 0) {
  return result;

代码示例来源:origin: ibinti/bugvm

continue;
c1 = foldCase(c1);
c2 = foldCase(c2);
if ((result = c1 - c2) != 0) {
  return result;

代码示例来源:origin: com.bugvm/bugvm-rt

continue;
c1 = foldCase(c1);
c2 = foldCase(c2);
if ((result = c1 - c2) != 0) {
  return result;

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

continue;
c1 = foldCase(c1);
c2 = foldCase(c2);
if ((result = c1 - c2) != 0) {
  return result;

代码示例来源:origin: FlexoVM/flexovm

continue;
c1 = foldCase(c1);
c2 = foldCase(c2);
if ((result = c1 - c2) != 0) {
  return result;

代码示例来源:origin: MobiVM/robovm

char c1 = value[thisStart++];
char c2 = target[start++];
if (c1 != c2 && foldCase(c1) != foldCase(c2)) {
  return false;

代码示例来源:origin: com.bugvm/bugvm-rt

/**
 * Compares the specified string to this string ignoring the case of the
 * characters and returns true if they are equal.
 *
 * @param string
 *            the string to compare.
 * @return {@code true} if the specified string is equal to this string,
 *         {@code false} otherwise.
 */
@FindBugsSuppressWarnings("ES_COMPARING_PARAMETER_STRING_WITH_EQ")
public boolean equalsIgnoreCase(String string) {
  if (string == this) {
    return true;
  }
  if (string == null || count != string.count) {
    return false;
  }
  int o1 = offset, o2 = string.offset;
  int end = offset + count;
  char[] target = string.value;
  while (o1 < end) {
    char c1 = value[o1++];
    char c2 = target[o2++];
    if (c1 != c2 && foldCase(c1) != foldCase(c2)) {
      return false;
    }
  }
  return true;
}

代码示例来源:origin: MobiVM/robovm

/**
 * Compares the specified string to this string ignoring the case of the
 * characters and returns true if they are equal.
 *
 * @param string
 *            the string to compare.
 * @return {@code true} if the specified string is equal to this string,
 *         {@code false} otherwise.
 */
@FindBugsSuppressWarnings("ES_COMPARING_PARAMETER_STRING_WITH_EQ")
public boolean equalsIgnoreCase(String string) {
  if (string == this) {
    return true;
  }
  if (string == null || count != string.count) {
    return false;
  }
  int o1 = offset, o2 = string.offset;
  int end = offset + count;
  char[] target = string.value;
  while (o1 < end) {
    char c1 = value[o1++];
    char c2 = target[o2++];
    if (c1 != c2 && foldCase(c1) != foldCase(c2)) {
      return false;
    }
  }
  return true;
}

代码示例来源:origin: ibinti/bugvm

/**
 * Compares the specified string to this string ignoring the case of the
 * characters and returns true if they are equal.
 *
 * @param string
 *            the string to compare.
 * @return {@code true} if the specified string is equal to this string,
 *         {@code false} otherwise.
 */
@FindBugsSuppressWarnings("ES_COMPARING_PARAMETER_STRING_WITH_EQ")
public boolean equalsIgnoreCase(String string) {
  if (string == this) {
    return true;
  }
  if (string == null || count != string.count) {
    return false;
  }
  int o1 = offset, o2 = string.offset;
  int end = offset + count;
  char[] target = string.value;
  while (o1 < end) {
    char c1 = value[o1++];
    char c2 = target[o2++];
    if (c1 != c2 && foldCase(c1) != foldCase(c2)) {
      return false;
    }
  }
  return true;
}

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

/**
 * Compares the specified string to this string ignoring the case of the
 * characters and returns true if they are equal.
 *
 * @param string
 *            the string to compare.
 * @return {@code true} if the specified string is equal to this string,
 *         {@code false} otherwise.
 */
@FindBugsSuppressWarnings("ES_COMPARING_PARAMETER_STRING_WITH_EQ")
public boolean equalsIgnoreCase(String string) {
  if (string == this) {
    return true;
  }
  if (string == null || count != string.count) {
    return false;
  }
  int o1 = offset, o2 = string.offset;
  int end = offset + count;
  char[] target = string.value;
  while (o1 < end) {
    char c1 = value[o1++];
    char c2 = target[o2++];
    if (c1 != c2 && foldCase(c1) != foldCase(c2)) {
      return false;
    }
  }
  return true;
}

代码示例来源:origin: ibinti/bugvm

char c1 = value[thisStart++];
char c2 = target[start++];
if (c1 != c2 && foldCase(c1) != foldCase(c2)) {
  return false;

代码示例来源:origin: com.gluonhq/robovm-rt

char c1 = value[thisStart++];
char c2 = target[start++];
if (c1 != c2 && foldCase(c1) != foldCase(c2)) {
  return false;

代码示例来源:origin: com.gluonhq/robovm-rt

/**
 * Compares the specified string to this string ignoring the case of the
 * characters and returns true if they are equal.
 *
 * @param string
 *            the string to compare.
 * @return {@code true} if the specified string is equal to this string,
 *         {@code false} otherwise.
 */
@FindBugsSuppressWarnings("ES_COMPARING_PARAMETER_STRING_WITH_EQ")
public boolean equalsIgnoreCase(String string) {
  if (string == this) {
    return true;
  }
  if (string == null || count != string.count) {
    return false;
  }
  int o1 = offset, o2 = string.offset;
  int end = offset + count;
  char[] target = string.value;
  while (o1 < end) {
    char c1 = value[o1++];
    char c2 = target[o2++];
    if (c1 != c2 && foldCase(c1) != foldCase(c2)) {
      return false;
    }
  }
  return true;
}

代码示例来源:origin: com.bugvm/bugvm-rt

char c1 = value[thisStart++];
char c2 = target[start++];
if (c1 != c2 && foldCase(c1) != foldCase(c2)) {
  return false;

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

char c1 = value[thisStart++];
char c2 = target[start++];
if (c1 != c2 && foldCase(c1) != foldCase(c2)) {
  return false;

代码示例来源:origin: FlexoVM/flexovm

/**
 * Compares the specified string to this string ignoring the case of the
 * characters and returns true if they are equal.
 *
 * @param string
 *            the string to compare.
 * @return {@code true} if the specified string is equal to this string,
 *         {@code false} otherwise.
 */
@FindBugsSuppressWarnings("ES_COMPARING_PARAMETER_STRING_WITH_EQ")
public boolean equalsIgnoreCase(String string) {
  if (string == this) {
    return true;
  }
  if (string == null || count != string.count) {
    return false;
  }
  int o1 = offset, o2 = string.offset;
  int end = offset + count;
  char[] target = string.value;
  while (o1 < end) {
    char c1 = value[o1++];
    char c2 = target[o2++];
    if (c1 != c2 && foldCase(c1) != foldCase(c2)) {
      return false;
    }
  }
  return true;
}

相关文章

微信公众号

最新文章

更多