如题,在UITextView 是聊天界面的输入框,因为要输入自定义表情,所以就有这样的字符串:[调皮][大哭]
现在有一个删除按钮用于删除UITextView 中光标前面的特殊字符串,比如点了删除按钮后要删除"你好啊[调皮]吃饭了吗?[大哭]"中的"[大哭]",如果是这样:"你好啊[调皮]吃饭了吗",则删除"吗" 请问各路大侠,有什么思路?
认证0级讲师
Determine whether the last one is "]", then determine the length of characters in "[" and "]" (for more accuracy), use the index to locate "[]", and delete it
Determine whether the last one is "]", then determine the length of characters in "[" and "]" (for more accuracy), use the index to locate "[]", and delete it