Is NSAttributedString attributedString.string.utf16.count always equivalent to attributedString.length?

Viewed 36

I notice there are several ways to construct NSRange

let range = NSRange(location: 0, length: attributedString.length)        
attributedString.addAttribute(..., range: range)

and

let range = NSRange(location: 0, length: attributedString.string.utf16.count)        
attributedString.addAttribute(..., range: range)

I was wondering, is attributedString.length always equivalent to attributedString.string.utf16.count?

So far, I can't find out any case when they are different.

Is there a situation when they are not?

1 Answers
Related