ios - Replace character in NSMutableAttributedString -


this works regular nsstring:

nsstring *newstring = [mystring stringbyreplacingoccurrencesofstring:@"," withstring:@""]; 

but there no such method nsmutableattributedstring. how remove instances of comma in nsmutableattributedstring?

do before create attributed string, if can or depending on how source it. if can't can use replacecharactersinrange:withstring: (or replacecharactersinrange:withattributedstring:), need know range need search , iterate yourself.


Comments

Popular posts from this blog

Java 8 + Maven Javadoc plugin: Error fetching URL -

android - How to delete or change the searchview icon inside the SearchView actionBar? -

c++ - Msgpack packing bools bug -