title: optional substring character
body: <p>I'm using XSLT 1.0</p>
  
  <p>I have a node that sometimes has a ~ in it:</p>
  
  <pre><code>&lt;node id="123~001"/&gt;
  </code></pre>
  
  <p>And sometimes it doesn't:</p>
  
  <pre><code>&lt;node id="123"/&gt;
  </code></pre>
  
  <p>I'm wondering if the substring-before command allows for optional characters?  If it doesn't what is the best way to check to see if the ~ exists or not?</p>