Formats the structured data as described in RFC 5424.

@param format The format identifier. Ignored in this implementation.
@return The formatted String.
343114
@Override
    public String asString(final String format) {
        try {
            return asString(EnglishEnums.valueOf(Format.class, format), null);
        } catch (final IllegalArgumentException ex) {
            return asString();
        }
    }
515326
public String format(String key) {
        if (traceNLS != null) {
            return traceNLS.getString(key);
        } else {
            return key;
        }
    }
1141854
public static String dateToStr(Date date, String format) {
        return new SimpleDateFormat(format).format(date);
    }
840626
public boolean outputRecord(final String format)
    throws IOException {
    	boolean result = true;
        if (format.equals(CDX)) {
            System.out.println(get().outputCdx(getStrippedFileName()));
        } else if(format.equals(ArchiveFileConstants.DUMP)) {
            // No point digesting if dumping content.
            setDigest(false);
            get().dump();
        } else {
        	result = false;
        }
        return result;
    }
2082
public synchronized static String formatAgmipDateString(String agmipDate, String format) {
        try {
            SimpleDateFormat fmt = new SimpleDateFormat(format);
            Date d = dateFormatter.parse(agmipDate);
            return fmt.format(d);
        } catch (Exception ex) {
            return null;
        }
    }
1074936
def __getFormat(self, format):
		
		if format == "XML":
			self.sparql.setReturnFormat(XML)
			self.format = "XML"
		elif format == "RDF":
			self.sparql.setReturnFormat(RDF)
			self.format = "RDF"
		else:
			self.sparql.setReturnFormat(JSON)
			self.format = "JSON"
642738
public static String getFormatDate(String format, Date date) {
        return getFormatDate(format, date, ZoneId.systemDefault().getId());
    }
42323
public String serialize(Node node, boolean format) {
        Result result;
        StringWriter dest;

        if (node == null) {
            throw new IllegalArgumentException();
        }
        dest = new StringWriter();
        result = new StreamResult(dest);
        try {
            serialize(node, result, format);
        } catch (IOException e) {
            throw new IllegalStateException(e);
        }
        return dest.getBuffer().toString();
    }
846253
@MapMethod
    public String formatDate(Date d, String format){
        return Objects.formatDate(d, format);
    }
1107337
public static String convertFormat(String format) {
		if (format == null)
			return null;
		else {
			// day of week
			format = format.replaceAll("EEE", "D");
			// year
			format = format.replaceAll("yy", "y");

			// month
			if (format.indexOf("MMM") != -1) {
				format = format.replaceAll("MMM", "M");
			} else {
				format = format.replaceAll("M", "m");
			}
			return format;
		}
	}
776260
public static String getSLcDtTm( String FormatS ) {
		//
		String Result = "?";
		//
    	LocalDateTime LDT = LocalDateTime.now();
    	//
    	Result = "LDTm: " +  LDT.format( DateTimeFormatter.ofPattern( FormatS ) );
    	//
		return Result;
	}
1084731
public String asString(final String format) {
        try {
            return format(EnglishEnums.valueOf(MapFormat.class, format), new StringBuilder()).toString();
        } catch (final IllegalArgumentException ex) {
            return asString();
        }
    }
1208709
public void setFormat(String format) {
    this.format = format;

    // Track multiple streams over the format string.
    Scanner scanner = new Scanner(format);
    this.streams[0] = scanner.stream();
    this.streams[1] = scanner.stream();
    for (int i = 2; i < this.streams.length; i++) {
      this.streams[i] = null;
    }

    // Streams for temporary matching.
    this.tag = scanner.stream();
    this.choice = scanner.stream();
  }
558208
public function format(string $format)
    {
        $result = '';
        $length = \mb_strlen($format);

        $skip_next = false;

        // iterate for each character
        for ($index = 0; $index < $length; $index++) {
            $format_char = mb_substr($format, $index, 1);

            $result .= $this->getValueOfFormatCharacter($format_char, $skip_next);
        }

        // remove null bits if they exist
        return str_replace("\0", '', $result);
    }
913032
public String format(String source) {
		String sql = new FormatProcess(source).perform();
		if (StringUtils.isNotEmpty(sql)) {
			sql = sql.trim();
		}
		return sql;
	}
551152
public static FormatOptions of(String format) {
    if (checkNotNull(format).equals(CSV)) {
      return csv();
    } else if (format.equals(DATASTORE_BACKUP)) {
      return datastoreBackup();
    } else if (format.equals(GOOGLE_SHEETS)) {
      return googleSheets();
    } else if (format.equals(BIGTABLE)) {
      return bigtable();
    }
    return new FormatOptions(format);
  }
287640
public static String toJavaDatePattern(String format) {

        int          len = format.length();
        char         ch;
        StringBuffer sb        = new StringBuffer(len);
        Tokenizer    tokenizer = new Tokenizer();

        for (int i = 0; i <= len; i++) {
            ch = (i == len) ? e
                            : format.charAt(i);

            if (!tokenizer.next(ch, dateTokens)) {
                int index = tokenizer.getLastMatch();

                if (index >= 0) {
                    sb.setLength(sb.length() - tokenizer.length());
                    sb.append(javaDateTokens[index]);
                }

                tokenizer.reset();

                if (tokenizer.isConsumed()) {
                    continue;
                }
            }

            sb.append(ch);
        }

        sb.setLength(sb.length() - 1);

        String javaPattern = sb.toString();

        return javaPattern;
    }