# HG changeset patch
# User ZyX <[email protected]>
# Date 1347557709 -14400
# Node ID 4eaeb62c1871c95e59c3f232f98e6f664fa8435c
# Parent 35fbcce08538a7540ab0e3a3c64305951ebbe589
Use empty() for testing string emptiness
diff -r 35fbcce08538 -r 4eaeb62c1871 runtime/doc/eval.txt
--- a/runtime/doc/eval.txt Thu Sep 13 19:45:10 2012 +0400
+++ b/runtime/doc/eval.txt Thu Sep 13 21:34:44 2012 +0400
@@ -91,8 +91,8 @@
Note that in the command >
:if "foo"
"foo" is converted to 0, which means FALSE. To test for a non-empty string,
-use strlen(): >
- :if strlen("foo")
+use empty(): >
+ :if !empty("foo")
< *E745* *E728* *E703* *E729* *E730* *E731*
List, Dictionary and Funcref types are not automatically converted.
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
*** /tmp/extdiff.caqq9D/vim.35fbcce08538/runtime/doc/eval.txt 2012-09-13 21:35:21.000000000 +0400
--- vim.4eaeb62c1871/runtime/doc/eval.txt 2012-09-13 21:35:21.000000000 +0400
***************
*** 91,98 ****
Note that in the command >
:if "foo"
"foo" is converted to 0, which means FALSE. To test for a non-empty string,
! use strlen(): >
! :if strlen("foo")
< *E745* *E728* *E703* *E729* *E730* *E731*
List, Dictionary and Funcref types are not automatically converted.
--- 91,98 ----
Note that in the command >
:if "foo"
"foo" is converted to 0, which means FALSE. To test for a non-empty string,
! use empty(): >
! :if !empty("foo")
< *E745* *E728* *E703* *E729* *E730* *E731*
List, Dictionary and Funcref types are not automatically converted.