iconara
Registered
Coming from Java, Obj-C/Cocoa seems to lack good support for working with strings, is this true or am I missing something?
What I want to do is assemble this input:
<blockquote>
<tt>
2620<br>
0K .......... .......... ..<br>
........ .......... ...<br>
....... 77%<br>
@ 6.9<br>
8 MB/s<br>
</tt>
</blockquote>
(I have to check for a newline before and after, since there are more lines like this one... and yes you are right, it's output from wget)
into this string:
<blockquote>
<tt>26200K .......... .......... .......... .......... .......... 77% @ 6.98 MB/s</tt>
</blockquote>
and then take out these values (as NSNumbers):
<blockquote>
26200
77
6.98
</blockquote>
Doing this in Java is easy using indexOf() and substring(), but NSString does not have these methods...
regards
Theo
What I want to do is assemble this input:
<blockquote>
<tt>
2620<br>
0K .......... .......... ..<br>
........ .......... ...<br>
....... 77%<br>
@ 6.9<br>
8 MB/s<br>
</tt>
</blockquote>
(I have to check for a newline before and after, since there are more lines like this one... and yes you are right, it's output from wget)
into this string:
<blockquote>
<tt>26200K .......... .......... .......... .......... .......... 77% @ 6.98 MB/s</tt>
</blockquote>
and then take out these values (as NSNumbers):
<blockquote>
26200
77
6.98
</blockquote>
Doing this in Java is easy using indexOf() and substring(), but NSString does not have these methods...
regards
Theo