Search code examples
iosxcodecocoa-touchswift3operators

'...' is not a postfix unary operator - Swift 3


I just want to remove one part of string .

if let dotRange = detailArticleContent?.range(of: "<iframe") {

    detailArticleContent.removeSubrange( dotRange.lowerBound... < detailArticleContent.endIndex )
    //In this line i got err : '...' is not a postfix unary operator 

   }

Solution

  • Use either ... (close range) or ..< (half close range, before last), there's nothing like ... <