mirror of
https://github.com/divkit/divkit.git
synced 2026-05-07 20:02:32 +00:00
e5063769f7
commit_hash:ec81d67275138150c1bc92e6c2b1009ee71935c4
390 lines
8.8 KiB
JSON
390 lines
8.8 KiB
JSON
{
|
|
"signatures": [
|
|
{
|
|
"function_name": "len",
|
|
"doc": "Gets the length of string argument. Returns integer value.",
|
|
"arguments": [
|
|
{
|
|
"type": "string",
|
|
"doc": "String value to get length of."
|
|
}
|
|
],
|
|
"result_type": "integer",
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web",
|
|
"flutter"
|
|
]
|
|
},
|
|
{
|
|
"function_name": "contains",
|
|
"doc": "Gets if second string argument contains in first string argument. Returns boolean value.",
|
|
"arguments": [
|
|
{
|
|
"type": "string",
|
|
"doc": "String value to find substring."
|
|
},
|
|
{
|
|
"type": "string",
|
|
"doc": "String value substring to find."
|
|
}
|
|
],
|
|
"result_type": "boolean",
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web",
|
|
"flutter"
|
|
]
|
|
},
|
|
{
|
|
"function_name": "substring",
|
|
"doc": "Gets substring of first argument in range of last arguments. Returns string value.",
|
|
"arguments": [
|
|
{
|
|
"type": "string",
|
|
"doc": "String value to get substring from."
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"doc": "Integer value, left index of substring."
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"doc": "Integer value, right index of substring."
|
|
}
|
|
],
|
|
"result_type": "string",
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web",
|
|
"flutter"
|
|
]
|
|
},
|
|
{
|
|
"function_name": "replaceAll",
|
|
"doc": "Replaces all occurrences of the second argument in the first argument with the third argument. Returns string value of replaced string.",
|
|
"arguments": [
|
|
{
|
|
"type": "string",
|
|
"doc": "String value, original string."
|
|
},
|
|
{
|
|
"type": "string",
|
|
"doc": "String value, string to find."
|
|
},
|
|
{
|
|
"type": "string",
|
|
"doc": "String value, string to replace."
|
|
}
|
|
],
|
|
"result_type": "string",
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web",
|
|
"flutter"
|
|
]
|
|
},
|
|
{
|
|
"function_name": "index",
|
|
"doc": "Gets first index of second argument in first argument. Returns integer value, index of occurrence or -1 if substring is not found.",
|
|
"arguments": [
|
|
{
|
|
"type": "string",
|
|
"doc": "String value, original string."
|
|
},
|
|
{
|
|
"type": "string",
|
|
"doc": "String value, string to find."
|
|
}
|
|
],
|
|
"result_type": "integer",
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web",
|
|
"flutter"
|
|
]
|
|
},
|
|
{
|
|
"function_name": "lastIndex",
|
|
"doc": "Gets last index of second argument in first argument. Returns integer value, index of occurrence or -1 if substring is not found.",
|
|
"arguments": [
|
|
{
|
|
"type": "string",
|
|
"doc": "String value, original string."
|
|
},
|
|
{
|
|
"type": "string",
|
|
"doc": "String value, string to find."
|
|
}
|
|
],
|
|
"result_type": "integer",
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web",
|
|
"flutter"
|
|
]
|
|
},
|
|
{
|
|
"function_name": "encodeUri",
|
|
"doc": "Translates a string into application/x-www-form-urlencoded format using a specific encoding scheme. Returns string value, encoded string.",
|
|
"arguments": [
|
|
{
|
|
"type": "string",
|
|
"doc": "String value to translate."
|
|
}
|
|
],
|
|
"result_type": "string",
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web",
|
|
"flutter"
|
|
]
|
|
},
|
|
{
|
|
"function_name": "decodeUri",
|
|
"doc": "Decodes a application/x-www-form-urlencoded string using a specific encoding scheme. Returns string value, decoded string.",
|
|
"arguments": [
|
|
{
|
|
"type": "string",
|
|
"doc": "String value to decode."
|
|
}
|
|
],
|
|
"result_type": "string",
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web",
|
|
"flutter"
|
|
]
|
|
},
|
|
{
|
|
"function_name": "trim",
|
|
"doc": "Returns a string having leading and trailing whitespace removed.",
|
|
"arguments": [
|
|
{
|
|
"type": "string",
|
|
"doc": "String value to trim."
|
|
}
|
|
],
|
|
"result_type": "string",
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web",
|
|
"flutter"
|
|
]
|
|
},
|
|
{
|
|
"function_name": "trimLeft",
|
|
"doc": "Returns a string having leading whitespace removed.",
|
|
"arguments": [
|
|
{
|
|
"type": "string",
|
|
"doc": "String value to trim."
|
|
}
|
|
],
|
|
"result_type": "string",
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web",
|
|
"flutter"
|
|
]
|
|
},
|
|
{
|
|
"function_name": "trimRight",
|
|
"doc": "Returns a string having trailing whitespace removed.",
|
|
"arguments": [
|
|
{
|
|
"type": "string",
|
|
"doc": "String value to trim."
|
|
}
|
|
],
|
|
"result_type": "string",
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web",
|
|
"flutter"
|
|
]
|
|
},
|
|
{
|
|
"function_name": "toUpperCase",
|
|
"doc": "Returns converted to upper case string.",
|
|
"arguments": [
|
|
{
|
|
"type": "string",
|
|
"doc": "String value to transform."
|
|
}
|
|
],
|
|
"result_type": "string",
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web",
|
|
"flutter"
|
|
]
|
|
},
|
|
{
|
|
"function_name": "toLowerCase",
|
|
"doc": "Returns converted to lower case string.",
|
|
"arguments": [
|
|
{
|
|
"type": "string",
|
|
"doc": "String value to transform."
|
|
}
|
|
],
|
|
"result_type": "string",
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web",
|
|
"flutter"
|
|
]
|
|
},
|
|
{
|
|
"function_name": "padStart",
|
|
"doc": "Pads a string to a given string length, inserting at start",
|
|
"arguments": [
|
|
{
|
|
"type": "string",
|
|
"doc": "String value to pad."
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"doc": "String length"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"doc": "String character to pad with"
|
|
}
|
|
],
|
|
"result_type": "string",
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web",
|
|
"flutter"
|
|
]
|
|
},
|
|
{
|
|
"function_name": "padStart",
|
|
"doc": "Converts given integer to a string and pads it to a given string length, inserting at start",
|
|
"arguments": [
|
|
{
|
|
"type": "integer",
|
|
"doc": "Integer value to pad."
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"doc": "String length"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"doc": "String character to pad with"
|
|
}
|
|
],
|
|
"result_type": "string",
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web",
|
|
"flutter"
|
|
]
|
|
},
|
|
{
|
|
"function_name": "padEnd",
|
|
"doc": "Pads a string to a given string length, inserting at end",
|
|
"arguments": [
|
|
{
|
|
"type": "string",
|
|
"doc": "String value to pad."
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"doc": "String length"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"doc": "String character to pad with"
|
|
}
|
|
],
|
|
"result_type": "string",
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web",
|
|
"flutter"
|
|
]
|
|
},
|
|
{
|
|
"function_name": "padEnd",
|
|
"doc": "Converts given integer to a string and pads it to a given string length, inserting at end",
|
|
"arguments": [
|
|
{
|
|
"type": "integer",
|
|
"doc": "Integer value to pad."
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"doc": "String length"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"doc": "String character to pad with"
|
|
}
|
|
],
|
|
"result_type": "string",
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web",
|
|
"flutter"
|
|
]
|
|
},
|
|
{
|
|
"function_name": "testRegex",
|
|
"doc": "Checks whether the string matches the regular expression.",
|
|
"arguments": [
|
|
{
|
|
"type": "string",
|
|
"doc": "A string to test."
|
|
},
|
|
{
|
|
"type": "string",
|
|
"doc": "Regex string."
|
|
}
|
|
],
|
|
"result_type": "boolean",
|
|
"platforms": [
|
|
"android",
|
|
"ios",
|
|
"web",
|
|
"flutter"
|
|
]
|
|
},
|
|
{
|
|
"function_name": "encodeRegex",
|
|
"doc": "Encodes a string for safe use in regular expressions.",
|
|
"arguments": [
|
|
{
|
|
"type": "string",
|
|
"doc": "A string to encode."
|
|
}
|
|
],
|
|
"result_type": "string",
|
|
"platforms": [
|
|
"web",
|
|
"android"
|
|
]
|
|
}
|
|
]
|
|
}
|