title: VimL: Checking if function exists
body: <p>right now I'm cleaning up my <code>.vimrc</code> file to make sure it's compatible on most systems.</p>
  
  <p>In my statusline I use a function that another plugin sets, the <code>GitBranchInfoString()</code> function introduced by <a href="https://github.com/taq/vim-git-branch-info" rel="noreferrer">this plugin</a>.</p>
  
  <p>What I wanna do is check if this function is set, and only then add it to the statusline. It would be in it's own line so I just need to check for it.</p>
  
  <p>What would be the simplest way to accomplish this?</p>
  
  <p>Thanks for all your help!</p>
  
  <p>EDIT:</p>
  
  <p>I have the following:</p>
  
  <pre><code>if exists('*GitBranchInfoString')
      let &amp;stl.='%{GitBranchInfoString()}'
  endif
  </code></pre>