title: Swift3 convert string value to hexadecimal string
body: <p>I am new to Swift and I want to convert a string into hexadecimal string. I have found a <em>Objective-C</em> function to a string into hexadecimal.</p>
  
  <pre><code>NSString * str = @"Say Hello to My Little Friend";
  
  NSString * hexString = [NSString stringWithFormat:@"%@",
  [NSData dataWithBytes:[str cStringUsingEncoding:NSUTF8StringEncoding]
                                           length:strlen([str cStringUsingEncoding:NSUTF8StringEncoding])]];
  
  for (NSString * toRemove in [NSArray arrayWithObjects:@"&lt;", @"&gt;", @" ", nil])
      hexString = [hexString stringByReplacingOccurrencesOfString:toRemove withString:@""];
  
  NSLog(@"hexStr:%@", hexString);
  </code></pre>
  
  <p>Now I am unable to convert this function in Swift. Currently I am using Swift3. </p>
  
  <p>Please someone can do this for me? </p>