title: How to create a custom NSCharacterSet?
body: <p>I’m using <code>CharacterSet.urlQueryAllowed</code> to add percent-encoding to a String. </p>
  
  <p>Some characters are not encoded the way I expected (i.e. <code>&amp;</code> and <code>?</code> are not changed). That being said, I had the idea to build a custom <code>CharacterSet</code>, ideally based on an existing one.</p>
  
  <p>What’s the best approach to do so?</p>