diff src/evalfunc.c @ 17624:4c7097a980a5 v8.1.1809

patch 8.1.1809: more functions can be used as a method commit https://github.com/vim/vim/commit/a74e4946de074d2916e3d6004f7fa1810d12dda9 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Aug 4 17:35:53 2019 +0200 patch 8.1.1809: more functions can be used as a method Problem: More functions can be used as a method. Solution: Add has_key(), split(), str2list(), etc.
author Bram Moolenaar <Bram@vim.org>
date Sun, 04 Aug 2019 17:45:05 +0200
parents 072efa9ca875
children 1687c8935ab6
line wrap: on
line diff
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -995,7 +995,8 @@ static funcentry_T global_functions[] =
 #define FEARG_2    2	    // base is the second argument
 
 /*
- * Methods that call the internal function with the base as the first argument.
+ * Methods that call the internal function with the base as one of the
+ * arguments.
  */
 static funcentry_T base_methods[] =
 {
@@ -1011,6 +1012,7 @@ static funcentry_T base_methods[] =
     {"extend",		1, 2, 0,	    f_extend},
     {"filter",		1, 1, 0,	    f_filter},
     {"get",		1, 2, 0,	    f_get},
+    {"has_key",		1, 1, 0,	    f_has_key},
     {"index",		1, 3, 0,	    f_index},
     {"insert",		1, 2, 0,	    f_insert},
     {"items",		0, 0, 0,	    f_items},
@@ -1024,7 +1026,17 @@ static funcentry_T base_methods[] =
     {"repeat",		1, 1, 0,	    f_repeat},
     {"reverse",		0, 0, 0,	    f_reverse},
     {"sort",		0, 2, 0,	    f_sort},
+    {"split",		0, 2, 0,	    f_split},
+    {"str2list",	0, 1, 0,	    f_str2list},
     {"string",		0, 0, 0,	    f_string},
+    {"strlen",		0, 0, 0,	    f_strlen},
+    {"strtrans",	0, 0, 0,	    f_strtrans},
+    {"strwidth",	0, 0, 0,	    f_strwidth},
+    {"substitute",	3, 3, 0,	    f_substitute},
+    {"synIDattr",	1, 2, 0,	    f_synIDattr},
+    {"synIDtrans",	0, 0, 0,	    f_synIDtrans},
+    {"system",		0, 1, 0,	    f_system},
+    {"systemlist",	0, 2, 0,	    f_systemlist},
     {"type",		0, 0, 0,	    f_type},
     {"uniq",		0, 2, 0,	    f_uniq},
     {"values",		0, 0, 0,	    f_values},