Displays the given parts with a bit of syntactic sugar.
@param parts The parts to display
@return The string that displays the given parts
341909
public static String displayParts(Object... parts) {
        StringBuilder builder = new StringBuilder("[");
        boolean first = true;
        for (Object part : parts) {
            if (first) {
                first = false;
            } else {
                builder.append('|');
            }
            if (part == null) {
                builder.append('?');
            } else {
                builder.append(display(part));
            }
        }
        builder.append(']');
        return builder.toString();
    }
613461
private String getPart(int pos) {
    String value = this.getValue();
    if (value == null) {
      return null;
    }
    String[] parts = value.split("/");
    return parts.length >= pos + 1 ? parts[pos] : null;
  }
687927
private String getPartition(Set<String> variables) {
    String key = buildKey(variables);
    return partitionIds.computeIfAbsent(key, k -> Character.toString((char)(BASE_ID + idSequence++)));
  }
712513
function literalFromParts(parts) {
  let s = '';
  for (let i=0; i<parts.length; i++) {
    let literal = parts[i].literal;
    s += literal || '';
  }
  return s;
}
366489
public static String flagsToString(short flags) {
        StringBuilder sb=new StringBuilder();
        boolean first=true;

        Flag[] all_flags=Flag.values();
        for(Flag flag: all_flags) {
            if(isFlagSet(flags, flag)) {
                if(first)
                    first=false;
                else
                    sb.append("|");
                sb.append(flag);
            }
        }
        return sb.toString();
    }
277238
public static String toIndexedQuery(final PartTree tree) {
		final StringBuilder result = new StringBuilder();
		
		final Iterator<OrPart> orIt = tree.iterator();
		while(orIt.hasNext()) {
			
			final OrPart orPart = orIt.next();
			
			final Iterator<Part> partIt = orPart.iterator();
			while(partIt.hasNext()) {
				final Part part = partIt.next();
				
				result.append(" " + part.getProperty().getSegment() + " ");
				result.append(convertOperator(part.getType()));
				
				if(partIt.hasNext()) {
					result.append(" AND ");
				}
			}
			
			if(orIt.hasNext()) {
				result.append(" OR ");
			}
		}
		
		return StringUtil.removeExtraSpaces(result.toString());
	}
968554
public static String urlEncode(final String part) {
		try {
			return URLEncoder.encode(part, DEFAULT_URL_ENCODING);
		} catch (UnsupportedEncodingException e) {
			throw new ImpossibleException(e);
		}
	}
455997
protected function processParts(array $parts)
    {
        $strValue = '';
        foreach ($parts as $part) {
            $strValue .= $part->getValue();
        }
        return [$this->partFactory->newDatePart($strValue)];
    }
1262677
public static String joinStrings( String separator, String... strings ) {
        if (separator == null) {
            separator = "";
        }
        StringBuilder sb = new StringBuilder();
        for( int i = 0; i < strings.length; i++ ) {
            sb.append(strings[i]);
            if (i < strings.length - 1) {
                sb.append(separator);
            }
        }
        return sb.toString();
    }
684559
public String
printFlags() {
	StringBuffer sb = new StringBuffer();

	for (int i = 0; i < 16; i++)
		if (validFlag(i) && getFlag(i)) {
			sb.append(Flags.string(i));
			sb.append(" ");
		}
	return sb.toString();
}
310083
public void show(final StringBuffer sb) {
    int start;
    start = this.span.getStart();
    if (!this.type.equals(ShiftReduceParser.TOK_NODE)) {
      sb.append("(");
      sb.append(this.type).append(" ");
      // System.out.print(label+" ");
      // System.out.print(head+" ");
      // System.out.print(df.format(prob)+" ");
    }
    for (Parse c : this.parts) {
      final Span s = c.span;
      if (start < s.getStart()) {
        // System.out.println("pre "+start+" "+s.getStart());
        sb.append(encodeToken(this.text.substring(start, s.getStart())));
      }
      c.show(sb);
      start = s.getEnd();
    }
    if (start < this.span.getEnd()) {
      sb.append(encodeToken(this.text.substring(start, this.span.getEnd())));
    }
    if (!this.type.equals(ShiftReduceParser.TOK_NODE)) {
      sb.append(")");
    }
  }
514964
public static String join(String joiner, String... parts) {
        StringBuilder builder = new StringBuilder();
        for (int i = 0; i < parts.length; i++) {
            builder.append(parts[i]);
            if (i < parts.length - 1) {
                builder.append(joiner);
            }
        }
        return builder.toString();
    }
397185
public static String display(Object first, Object second, Object... remainder) {
        Object[] array = new Object[remainder.length + 2];
        array[0] = first;
        array[1] = second;
        System.arraycopy(remainder, 0, array, 2, remainder.length);
        return display(array);
    }
988298
def list(self, parts: Any) -> str:
        
        _ = self.translate
        if len(parts) == 0:
            return ""
        if len(parts) == 1:
            return parts[0]
        comma = u" \u0648 " if self.code.startswith("fa") else u", "
        return _("%(commas)s and %(last)s") % {
            "commas": comma.join(parts[:-1]),
            "last": parts[len(parts) - 1],
        }
1289118
def read(*parts):
    
    with codecs.open(os.path.join(HERE, *parts), "rb", "utf-8") as f:
        return f.read()
604750
private ImmutableList<SoyMsgPart> compactParts(ImmutableList<SoyMsgPart> parts) {
    ImmutableList.Builder<SoyMsgPart> builder = ImmutableList.builder();
    for (SoyMsgPart part : parts) {
      builder.add(compactPart(part));
    }
    return builder.build();
  }
34229
public static String toNamedString(Object object, Object... components) {
        StringBuilder b = new StringBuilder(components.length * 5 + 2);
        if (object != null) {
            b.append(object.getClass().getSimpleName()).append(' ');
        }
        b.append('{');
        for (int i = 0; i < components.length; i++) {
            if (i != 0) {
                b.append(", ");
            }
            b.append(components[i]);
        }
        b.append('}');
        return b.toString();
    }