Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
24 lines (22 sloc) 1.06 KB
Necessary before merging the code into MacRuby:
- inherit from NSMutableString and implement necessary methods
- String#[]
- String#[]=
- String#encode
- String#inspect
- Encoding#find
- use Ruby 1.9's encoding tables for the Japanese encodings (EUC-JP, Shif_JIS, CP932, ISO-2022-JP)
- you should not be able to call Encoding#dup/clone
- refactorize tests
- handle correctly incorrect parameter types in the methods implemented
- if the string is ASCII-only and its encoding is ASCII-compatible, the string should be handled as ASCII
- maybe merge length and update_flags
Can be done later:
- check and fix the methods added to NS(Mutable)String
+ NSMutableString#force_encoding should throw an exception
+ When these methods return a new string it should be an instance of the new String
+ NS(Mutable)String#to_s should return an instance of the new String
- add a method to convert to NSData
- maybe also add methods to NSData
- add a UTF-8<->UTF-16 converter and UTF-8 string length counter (to be faster than using the ICU converter)
- add also optimisations for US-ASCII