---@meta

---Split input-string into one or more output strings in a table.
---
---The places to split are the places where split-string occurs.
---
---**Example:**
---
--- ```tarantoolsession
--- tarantool> string = require('string')
--- ---
--- ...
--- tarantool> string.split("A:B:C:D:F", ":", 2)
--- ---
--- - - A
---   - B
---   - C:D:F
--- ...
--- ```
---
---@param input_string string the string to split
---@param split_string? string (default: ' ') the string to find within input-string
---@param max? integer  maximum number of delimiters to process counting from the beginning of the input string. Result will contain max + 1 parts maximum.
---@return string[] # list of strings
function string.split(input_string, split_string, max) end

---Return the string left-justified in a string of length `width`.
---
---**Example:**
---
--- ```tarantoolsession
--- tarantool> string = require('string')
--- ---
--- ...
--- tarantool> string.ljust(' A', 5)
--- ---
--- - ' A   '
--- ...
--- ```
---
---@param input_string string the string to left-justify
---@param width number the width of the string after left-justifying
---@param pad_character? string (default: ' ') a single character
---@return string
function string.ljust(input_string, width, pad_character) end

---Return the string right-justified in a string of length `width`.
---
---**Example:**
---
--- ```tarantoolsession
--- tarantool> string = require('string')
--- ---
--- ...
--- tarantool> string.rjust('', 5, 'X')
--- ---
--- - 'XXXXX'
--- ...
--- ```
---
---@param input_string string the string to right-justify
---@param width number the width of the string after right-justifying
---@param pad_character? string (default: ' ') a single character
---@return string
function string.rjust(input_string, width, pad_character) end

---Return the hexadecimal value of the input string.
---
---**Example:**
---
--- ```tarantoolsession
--- tarantool> string = require('string')
--- ---
--- ...
--- tarantool> string.hex('ABC ')
--- ---
--- - '41424320'
--- ...
--- ```
---
---@param input_string string
---@return string
function string.hex(input_string) end

---Given a string containing pairs of hexadecimal digits, return a string with one byte for each pair.
---
---This is the reverse of `string.hex()`.
---
---The hexadecimal-input-string must contain an even number of hexadecimal digits.
---
---**Example:**
---
--- ```tarantoolsession
--- tarantool> string = require('string')
--- ---
--- ...
--- tarantool> string.fromhex('41424320')
--- ---
--- - 'ABC '
--- ...
--- ```
---
---@param input_string string
---@return string
function string.fromhex(input_string) end

---Return `true` if input-string starts with start-string, otherwise return `false`.
---
---**Example:**
---
--- ```tarantoolsession
--- tarantool> string = require('string')
--- ---
--- ...
--- tarantool> string.startswith(' A', 'A', 2, 5)
--- ---
--- - true
--- ...
--- ```
---
---@param input_string string the string where start-string should be looked for
---@param start_string string the string to look for
---@param start_pos? integer position: where to start looking within input-string
---@param end_pos? integer position: where to end looking within input-string
---@return boolean
function string.startswith(input_string, start_string, start_pos, end_pos) end

---Return `true` if input-string ends with end-string, otherwise return `false`.
---
---**Example:**
---
--- ```tarantoolsession
--- tarantool> string = require('string')
--- ---
--- ...
--- tarantool> string.endswith('Baa', 'aa')
--- ---
--- - true
--- ...
--- ```
---
---@param input_string string the string where start-string should be looked for
---@param start_string string the string to look for
---@param start_pos? integer position: where to start looking within input-string
---@param end_pos? integer position: where to end looking within input-string
---@return boolean
function string.endswith(input_string, start_string, start_pos, end_pos) end

---Return the value of the input string, after removing characters on the left.
---
---The optional `list-of-characters` parameter is a set not a sequence, so `string.lstrip(...,'ABC')` does not mean strip `'ABC'`, it means strip `'A'` or `'B'` or `'C'`.
---
---**Example:**
---
--- ```tarantoolsession
--- tarantool> string = require('string')
--- ---
--- ...
--- tarantool> string.lstrip(' ABC ')
--- ---
--- - 'ABC '
--- ...
--- ```
---
---@param input_string string the string to process
---@param list_of_characters string (default: ' ') what characters can be stripped.
---@return string
function string.lstrip(input_string) end

---Return the value of the input string, after removing characters on the right.
---
---The optional `list-of-characters` parameter is a set not a sequence, so `string.rstrip(...,'ABC')` does not mean strip `'ABC'`, it means strip `'A'` or `'B'` or `'C'`.
---
---**Example:**
---
--- ```tarantoolsession
--- tarantool> string = require('string')
--- ---
--- ...
--- tarantool> string.rstrip(' ABC ')
--- ---
--- - ' ABC'
--- ...
--- ```
---
---@param input_string string the string to process
---@param list_of_characters string (default: ' ') what characters can be stripped.
---@return string
function string.rstrip(input_string) end

---Return the value of the input string, after removing characters on the left and the right.
---
---The optional `list-of-characters` parameter is a set not a sequence, so `string.strip(...,'ABC')` does not mean strip `'ABC'`, it means strip `'A'` or `'B'` or `'C'`.
---
---**Example:**
---
--- ```tarantoolsession
--- tarantool> string = require('string')
--- ---
--- ...
--- tarantool> string.strip(' ABC ')
--- ---
--- - ABC
--- ...
--- ```
---
---@param input_string string the string to process
---@param list_of_characters string (default: ' ') what characters can be stripped.
---@return string
function string.strip(input_string) end
