Loading ...
Sorry, an error occurred while loading the content.

Re: String comparing (2)

Expand Messages
  • Nico Weber
    Hi, ... == acts according to ignorecase . Use ==# to always compare case- sensitively. See `:h ==#` for more information. HTH, Nico
    Message 1 of 2 , Aug 26, 2008
    • 0 Attachment
      Hi,

      On 26.08.2008, at 13:58, Xiaoyu ZHANG wrote:

      > Here is a simple script
      >
      > ================================
      > $ cat x.vim
      > if 'a' == 'A'
      > echoe "equal."
      > endif
      > ================================
      >
      > When i try source it (v7.2), i got this
      > ================================
      > :so x.vim
      > Error detected while processing x.vim:
      > line 2:
      > equal.
      > Press ENTER or type command to continue
      > ================================
      >
      > So comparison of string variable is not caps-sensitive? Is this okay?

      == acts according to 'ignorecase'. Use ==# to always compare case-
      sensitively. See `:h ==#` for more information.


      HTH,
      Nico

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_dev" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    Your message has been successfully submitted and would be delivered to recipients shortly.