import { FilterContext } from "../../filter";
import { Markup } from "../drops/markup";
/**
* Return the input value concatenated with the argument value.
*
* If either the input value or argument are not a string, they will be
* coerced to a string before concatenation.
*
* @param this - An object containing a reference to the active render context
* and any keyword/named arguments.
* @param left - Any value. Will be coerced to a string if it's not one already.
* @param other - Any value. Will be coerced to a string if it's not one already.
* @returns The input value concatenated with the argument value.
*/
export declare function append(this: FilterContext, left: unknown, other: unknown): string | Markup;
/**
* Return the input string with the first character in upper case and the rest
* lowercase.
*
* @param this - An object containing a reference to the active render context
* and any keyword/named arguments.
* @param left - Any value. Will be coerced to a string if it's not one already.
* @returns The input string with the first character in upper case and the rest
* lowercase.
*/
export declare function capitalize(this: FilterContext, left: unknown): string | Markup;
/**
* Return the input string with all characters in lowercase.
* @param this - An object containing a reference to the active render context
* and any keyword/named arguments.
* @param left - Any value. Will be coerced to a string if it's not one already.
* @returns The input string with all characters in lowercase.
*/
export declare function downcase(this: FilterContext, left: unknown): string | Markup;
/**
* Return the input string with `&`, `<`, `>`, `"`, `'`, and "\`" replaced with
* HTML escape codes.
*
* @param this - An object containing a reference to the active render context
* and any keyword/named arguments.
* @param left - Any value. Will be coerced to a string if it's not one already.
* @returns The input string with `&`, `<`, `>`, `"`, `'`, and "\`" replaced
* with HTML escape codes.
*/
export declare function escape(this: FilterContext, left: unknown): string | Markup;
/**
* Return the input string with `&`, `<`, `>`, `"`, `'`, and "\`" replaced with
* HTML escape codes while preserving existing escape sequences.
*
* @param this - An object containing a reference to the active render context
* and any keyword/named arguments.
* @param left - Any value. Will be coerced to a string if it's not one already.
* @returns The input string with `&`, `<`, `>`, `"`, `'`, and "\`" replaced
* with HTML escape codes while preserving existing escape sequences.
*/
export declare function escapeOnce(this: FilterContext, left: unknown): string | Markup;
/**
* Return the input string with all leading whitespace removed. If the input is
* not a string, it will be converted to a string before stripping whitespace.
* @param this - An object containing a reference to the active render context
* and any keyword/named arguments.
* @param left - Any value. Will be coerced to a string if it's not one already.
* @returns The input string with all leading whitespace removed
*/
export declare function lstrip(this: FilterContext, left: unknown): string | Markup;
/**
* Return the input string with `\n` and `\r\n` replaced with `
\n`.
* @param this - An object containing a reference to the active render context
* and any keyword/named arguments.
* @param left - Any value. Will be coerced to a string if it's not one already.
* @returns The input string with `\n` and `\r\n` replaced with `
\n`.
*/
export declare function newlineToBr(this: FilterContext, left: unknown): string | Markup;
/**
* Return the argument value concatenated with the input value.
*
* @param this - An object containing a reference to the active render context
* and any keyword/named arguments.
* @param left - Any value. Will be coerced to a string if it's not one already.
* @param other - Any value. Will be coerced to a string if it's not one already.
* @returns The argument value concatenated with the input value.
*/
export declare function prepend(this: FilterContext, left: unknown, other: unknown): string | Markup;
/**
* Return the input value with all occurrences of the argument substring
* removed.
*
* @param this - An object containing a reference to the active render context
* and any keyword/named arguments.
* @param left - Any value. Will be coerced to a string if it's not one already.
* @param subString - Any value. Will be coerced to a string if it's not one
* already.
* @returns The input value with all occurrences of the argument substring
* removed.
*/
export declare function remove(this: FilterContext, left: unknown, subString: unknown): string | Markup;
/**
* Return the input value with the first occurrence of the argument string
* removed.
*
* @param this - An object containing a reference to the active render context
* and any keyword/named arguments.
* @param left - Any value. Will be coerced to a string if it's not one already.
* @param subString - Any value. Will be coerced to a string if it's not one
* already.
* @returns The input value with the first occurrence of the argument string
* removed.
*/
export declare function removeFirst(this: FilterContext, left: unknown, subString: unknown): string | Markup;
/**
* Return the input value with the last occurrence of the argument string
* removed.
*
* @param this - An object containing a reference to the active render context
* and any keyword/named arguments.
* @param left - Any value. Will be coerced to a string if it's not one already.
* @param arg - Any value. Will be coerced to a string if it's not one already.
* @returns The input value with the last occurrence of the argument string
* removed.
*/
export declare function removeLast(this: FilterContext, left: unknown, arg: unknown): string | Markup;
/**
* Return the input string with all occurrences of the first argument replaced
* with the second argument.
*
* @param this - An object containing a reference to the active render context
* and any keyword/named arguments.
* @param left - Any value. Will be coerced to a string if it's not one already.
* @param subString - Any value. Will be coerced to a string if it's not one
* already.
* @param newSubString - Any value. Will be coerced to a string if it's not one
* already.
* @returns The input string with all occurrences of the first argument
* replaced with the second argument.
*/
export declare function replace(this: FilterContext, left: unknown, subString: unknown, newSubString?: unknown): string | Markup;
/**
* Return the input string with the first occurrence of the first argument
* replaced with the second argument.
*
* @param this - An object containing a reference to the active render context
* and any keyword/named arguments.
* @param left - Any value. Will be coerced to a string if it's not one already.
* @param subString - Any value. Will be coerced to a string if it's not one
* already.
* @param newSubString - Any value. Will be coerced to a string if it's not one
* already.
* @returns The input string with the first occurrence of the first argument
* replaced with the second argument.
*/
export declare function replaceFirst(this: FilterContext, left: unknown, subString: unknown, newSubString?: unknown): string | Markup;
/**
* Return the input string with the last occurrence of the first argument
* replaced with the second argument.
*
* @param this - An object containing a reference to the active render context
* and any keyword/named arguments.
* @param left - Any value. Will be coerced to a string if it's not one already.
* @param subString - Any value. Will be coerced to a string if it's not one
* already.
* @param newSubString - Any value. Will be coerced to a string if it's not one
* already.
* @returns The input string with the last occurrence of the first argument
* replaced with the second argument.
*/
export declare function replaceLast(this: FilterContext, left: unknown, subString: unknown, newSubString: unknown): string | Markup;
/**
* Return the input string with all characters in uppercase.
*
* @param this - An object containing a reference to the active render context
* and any keyword/named arguments.
* @param left - Any value. Will be coerced to a string if it's not one already.
* @returns The input string with all characters in uppercase.
*/
export declare function upcase(this: FilterContext, left: unknown): string | Markup;
/**
* Return an array of strings that are the input string split on the filter's
* argument string.
*
* @param this - An object containing a reference to the active render context
* and any keyword/named arguments.
* @param left - Any value. Will be coerced to a string if it's not one already.
* @param subString - Any value. Will be coerced to a string if it's not one
* already.
* @returns An array of strings that are the input string split on the filter's
* argument string.
*/
export declare function split(this: FilterContext, left: unknown, subString: unknown): string[] | Markup[];
/**
* Return the input string with all leading and trailing whitespace removed.
*
* @param this - An object containing a reference to the active render context
* and any keyword/named arguments.
* @param left - Any value. Will be coerced to a string if it's not one already.
* @returns The input string with all leading and trailing whitespace removed.
*/
export declare function strip(this: FilterContext, left: unknown): string | Markup;
/**
* Return the input string with all trailing whitespace removed.
*
* @param this - An object containing a reference to the active render context
* and any keyword/named arguments.
* @param left - Any value. Will be coerced to a string if it's not one already.
* @returns The input string with all trailing whitespace removed.
*/
export declare function rstrip(this: FilterContext, left: unknown): string | Markup;
/**
* Return the input string with all HTML tags removed.
*
* @param this - An object containing a reference to the active render context
* and any keyword/named arguments.
* @param left - Any value. Will be coerced to a string if it's not one already.
* @returns The input string with all HTML tags removed.
*/
export declare function stripHtml(this: FilterContext, left: unknown): string;
/**
* Return the input string with `\n` and `\r\n` removed.
*
* @param this - An object containing a reference to the active render context
* and any keyword/named arguments.
* @param left - Any value. Will be coerced to a string if it's not one already.
* @returns The input string with `\n` and `\r\n` removed.
*/
export declare function stripNewlines(this: FilterContext, left: unknown): string | Markup;
/**
* Return a truncated version of the input string. The first argument, length,
* defaults to `50`. The second argument defaults to an ellipsis (`...`).
*
* If the length of the input string is less than the given length (first
* argument), the input string will be truncated to `length` minus the length
* of the second argument, with the second argument appended.
*
* @param this - An object containing a reference to the active render context
* and any keyword/named arguments.
* @param left - Any value. Will be coerced to a string if it's not one already.
* @param length - Any value. If it can't be converted to a number, zero will
* be used instead. Defaults to `50`.
* @param end - Any value. Will be coerced to a string if it's not one already.
* Defaults to `...`.
* @returns A truncated version of the input string.
*/
export declare function truncate(this: FilterContext, left: unknown, length?: unknown, end?: unknown): string;
/**
* Return the input string truncated to the specified number of words, with
* the second argument appended. The number of words (first argument) defaults
* to `15`. The second argument defaults to an ellipsis (`...`).
*
* If the input string already has fewer than the given number of words, it is
* returned unchanged.
*
* @param this - An object containing a reference to the active render context
* and any keyword/named arguments.
* @param left - Any value. Will be coerced to a string if it's not one already.
* @param wordCount - Any value. If it can't be converted to a number, zero
* will be used instead. Defaults to `15`.
* @param end - Any value. Will be coerced to a string if it's not one already.
* Defaults to `...`.
* @returns The input string truncated to the specified number of words.
*/
export declare function truncateWords(this: FilterContext, left: unknown, wordCount?: unknown, end?: unknown): string;
/**
* Return the input string with URL reserved characters percent-escaped. Also
* replaces `' '` with `'+'`.
*
* @param this - An object containing a reference to the active render context
* and any keyword/named arguments.
* @param left - Any value. Will be coerced to a string if it's not one already.
* @returns The input string with URL reserved characters percent-escaped.
*/
export declare function urlEncode(this: FilterContext, left: unknown): string;
/**
* Return the input string with `%xx` escapes replaced with their single-
* character equivalents. Also replaces `'+'` with `' '`.
*
* @param this - An object containing a reference to the active render context
* and any keyword/named arguments.
* @param left - Any value. Will be coerced to a string if it's not one already.
* @returns The input string with `%xx` escapes replaced with their single-
* character equivalents.
*/
export declare function urlDecode(this: FilterContext, left: unknown): string;