Skip navigation.
 
mlRe: attributedStringByTrimmingCharactersInSet: method?
FROM : Adam R. Maxwell
DATE : Sun Jul 23 16:51:47 2006

On Jul 23, 2006, at 07:16, Keith Blount wrote:

> Thanks for your reply - much appreciated.
>
> I tried your idea, but the trouble with using the
> string methods directly, such as in your example, is
> that all of the formatting and attributes of the
> attributed string get stripped, which is obviously
> counter-productive.


Interesting; according to the documentation for -mutableString, that 
shouldn't happen, since changes to it are supposed to be tracked by 
the attributed string.  Poking around in the debugger with a test 
project shows that [[NSMutableAttributedString mutableString] class] 
returns NSMutableStringProxyForMutableAttributedString, so presumably 
this is another toll-free bridging bug.

You can still operate on it with NSMutableString Obj-C methods, which 
would avoid the overhead of using [newStr string] in your code.

-- Adam

Related mailsAuthorDate
mlattributedStringByTrimmingCharactersInSet: method? Keith Blount Jul 23, 12:44
mlRe: attributedStringByTrimmingCharactersInSet: method? Adam R. Maxwell Jul 23, 16:08
mlRe: attributedStringByTrimmingCharactersInSet: method? Keith Blount Jul 23, 16:16
mlRe: attributedStringByTrimmingCharactersInSet: method? Justin Anderson Jul 23, 16:44
mlRe: attributedStringByTrimmingCharactersInSet: method? Adam R. Maxwell Jul 23, 16:51