I have a html content of url:
let task = NSURLSession.sharedSession().dataTaskWithURL(url!) {
(data, response, error) in
(url!) is url which is loading and:
let urlContent = String(data: data!, encoding: NSUTF8StringEncoding)
So, urlContent is html content of url which is loading.I have a string
let string = "Custom string in html content"
which i want to add in urlContent, between <body> </body> tags
How can i do this? Thanks