sumim #582(2007/07/11 14:30 GMT) [ Smalltalk ] Rating0/0=0.00
Squeak Smalltalk で手続き的に。
1 2 3 4 5 6 7 8 9 10 11 12
| stream delimiter out string upToAll | string := 'AAA/a//*BB*B**/CCC'. stream := string readStream. delimiter := '*/'. upToAll := [stream upToAll: (delimiter := delimiter reversed)]. out := String new writeStream. [stream atEnd] whileFalse: [ out nextPutAll: upToAll value. upToAll value]. ^out contents "=> 'AAA/a/CCC' "
Rating0/0=0.00-0+
[ reply ]
sumim
#582()
[
Smalltalk
]
Rating0/0=0.00
Rating0/0=0.00-0+
[ reply ]