title: How to print variable name in swift?
body: <p>How do we print variable name in swift? It's similar to what this question discusses <a href="https://stackoverflow.com/questions/26005654/get-a-swift-variables-actual-name-as-string">Get a Swift Variable&#39;s Actual Name as String</a>
  I can't figure out from above QA how to print it in swift for my need as described below</p>
  
  <pre><code>struct API {
      static let apiEndPoint = "example.com/profile?"
      static let apiEndPoint1 = "example.com/user?"
   }
  
  doSomething(endPoint: API.apiEndPoint)
  doSomething(endPoint: API.apiEndPoint1)
  
  func doSomething(endPoint: String) {
      // print the variable name which should be apiEndPoint or endPoint1
  } 
  </code></pre>