#include <lauxlib.h>
#include <lua.h>
#include <lualib.h>
#include "cjson/lua_cjson.h"
#include "luv/luv.h"
#include "mpack/lmpack.h"
#include "nvim/api/private/defs.h"
#include "nvim/api/private/helpers.h"
#include "nvim/api/vim.h"
#include "nvim/ascii.h"
#include "nvim/assert.h"
#include "nvim/buffer_defs.h"
#include "nvim/change.h"
#include "nvim/cursor.h"
#include "nvim/eval/userfunc.h"
#include "nvim/event/loop.h"
#include "nvim/event/time.h"
#include "nvim/ex_cmds2.h"
#include "nvim/ex_getln.h"
#include "nvim/extmark.h"
#include "nvim/func_attr.h"
#include "nvim/garray.h"
#include "nvim/getchar.h"
#include "nvim/globals.h"
#include "nvim/lua/converter.h"
#include "nvim/lua/executor.h"
#include "nvim/lua/spell.h"
#include "nvim/lua/stdlib.h"
#include "nvim/lua/treesitter.h"
#include "nvim/lua/xdiff.h"
#include "nvim/macros.h"
#include "nvim/map.h"
#include "nvim/memline.h"
#include "nvim/message.h"
#include "nvim/msgpack_rpc/channel.h"
#include "nvim/os/os.h"
#include "nvim/regexp.h"
#include "nvim/regexp_defs.h"
#include "nvim/screen.h"
#include "nvim/types.h"
#include "nvim/undo.h"
#include "nvim/version.h"
#include "nvim/vim.h"
Functions | |
int | nlua_str_utfindex (lua_State *const lstate) FUNC_ATTR_NONNULL_ALL |
int | nlua_str_byteindex (lua_State *const lstate) FUNC_ATTR_NONNULL_ALL |
int | nlua_regex (lua_State *lstate) |
int | nlua_setvar (lua_State *lstate) |
int | nlua_getvar (lua_State *lstate) |
void | nlua_state_add_stdlib (lua_State *const lstate, bool is_thread) |
int nlua_getvar | ( | lua_State * | lstate | ) |
int nlua_regex | ( | lua_State * | lstate | ) |
int nlua_setvar | ( | lua_State * | lstate | ) |
int nlua_str_byteindex | ( | lua_State *const | lstate | ) |
convert UTF-32 or UTF-16 indices to byte index.
Expects up to three args: string, index and use_utf16. If use_utf16 is not supplied it defaults to false (use UTF-32)
Returns the byte index.
int nlua_str_utfindex | ( | lua_State *const | lstate | ) |
convert byte index to UTF-32 and UTF-16 indices
Expects a string and an optional index. If no index is supplied, the length of the string is returned.
Returns two values: the UTF-32 and UTF-16 indices.