net.digitalid.utility.circumfixes.Quotes.in()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(1.6k)|赞(0)|评价(0)|浏览(81)

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

Quotes.in介绍

[英]Returns the given object surrounded by the given quotes.
[中]

代码示例

代码示例来源:origin: net.digitalid.utility/utility-circumfixes

/**
 * Returns the given object in single quotes.
 */
@Pure
public static @Nonnull String inSingle(@Nullable Object object) {
  return in(Quotes.SINGLE, object);
}

代码示例来源:origin: net.digitalid.utility/utility-circumfixes

/**
 * Returns the given object in angle quotes.
 */
@Pure
public static @Nonnull String inAngle(@Nullable Object object) {
  return in(Quotes.ANGLE, object);
}

代码示例来源:origin: net.digitalid.utility/utility-circumfixes

/**
 * Returns the given object in double quotes.
 */
@Pure
public static @Nonnull String inDouble(@Nullable Object object) {
  return in(Quotes.DOUBLE, object);
}

代码示例来源:origin: net.digitalid.utility/utility-circumfixes

/**
 * Returns the given object in double quotes if it is an instance of {@link CharSequence} or without quotes otherwise.
 */
@Pure
public static @Nonnull String inCode(@Nullable Object object) {
  return in(Quotes.CODE, object);
}

代码示例来源:origin: net.digitalid.utility/utility-string

while (stringIndex < string.length() && argumentIndex < arguments.length) {
  if (string.charAt(stringIndex) == symbol) {
    final @Nonnull String argument = Quotes.in(quotes, arguments[argumentIndex]);
    string.replace(stringIndex, stringIndex + 1, argument);
    stringIndex += argument.length();
  while (argumentIndex < arguments.length) {
    if (first) { first = false; } else { string.append(", "); }
    string.append(Quotes.in(quotes, arguments[argumentIndex]));
    argumentIndex++;

相关文章