aboutsummaryrefslogtreecommitdiff
path: root/lstrlib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-03-20 09:54:08 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-03-20 09:54:08 -0300
commit88c9bf99de50df5575cce13e8e6c278b9f1dc0d0 (patch)
tree3cfe2080f0a2595b62b74752c84ffa763e83f8e6 /lstrlib.c
parent63a614e1453b6b03b89b5d47efa476acd5f9d1d2 (diff)
downloadlua-88c9bf99de50df5575cce13e8e6c278b9f1dc0d0.tar.gz
lua-88c9bf99de50df5575cce13e8e6c278b9f1dc0d0.tar.bz2
lua-88c9bf99de50df5575cce13e8e6c278b9f1dc0d0.zip
standard libraries in packages
Diffstat (limited to 'lstrlib.c')
-rw-r--r--lstrlib.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/lstrlib.c b/lstrlib.c
index 7ad674bd..ff8eba33 100644
--- a/lstrlib.c
+++ b/lstrlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstrlib.c,v 1.77 2002/02/08 22:39:36 roberto Exp roberto $ 2** $Id: lstrlib.c,v 1.78 2002/03/11 13:29:40 roberto Exp roberto $
3** Standard library for string operations and pattern-matching 3** Standard library for string operations and pattern-matching
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -707,18 +707,19 @@ static int str_format (lua_State *L) {
707 707
708 708
709static const luaL_reg strlib[] = { 709static const luaL_reg strlib[] = {
710{"strlen", str_len}, 710 {"len", str_len},
711{"strsub", str_sub}, 711 {"sub", str_sub},
712{"strlower", str_lower}, 712 {"lower", str_lower},
713{"strupper", str_upper}, 713 {"upper", str_upper},
714{"strchar", str_char}, 714 {"char", str_char},
715{"strrep", str_rep}, 715 {"rep", str_rep},
716{"strbyte", str_byte}, 716 {"byte", str_byte},
717{"concat", str_concat}, 717 {"concat", str_concat},
718{"format", str_format}, 718 {"format", str_format},
719{"strfind", str_find}, 719 {"find", str_find},
720{"gfind", gfind}, 720 {"gfind", gfind},
721{"gsub", str_gsub} 721 {"gsub", str_gsub},
722 {NULL, NULL}
722}; 723};
723 724
724 725
@@ -726,6 +727,7 @@ static const luaL_reg strlib[] = {
726** Open string library 727** Open string library
727*/ 728*/
728LUALIB_API int lua_strlibopen (lua_State *L) { 729LUALIB_API int lua_strlibopen (lua_State *L) {
729 luaL_openl(L, strlib); 730 luaL_opennamedlib(L, "str", strlib);
730 return 0; 731 return 0;
731} 732}
733