title: Swift: Create utility methods as static class or regular functions?
body: <p>Coming from Java we often create utility methods as:</p>
  
  <pre><code>class Util {
      public static doSomething(...) {
          ....
      }
  }
  </code></pre>
  
  <p>In Swift it seems you can do the same with <code>static func</code></p>
  
  <pre><code>class Util {
       static func doSomething(...) {
           ....
       }
  }
  </code></pre>
  
  <p>But then you can also just do a stand alone function in Swift which is not not within a class.</p>
  
  <pre><code>func doSomething(...) {
        ....
  }
  </code></pre>
  
  <p>What is the best practice?  Is this subjective or there is a reason why you must pick one or the other approach?</p>