Jump to content

Substring: Difference between revisions

no edit summary
m (syntax highlighting fixup automation)
No edit summary
Line 2,446:
cd
cd
</pre>
 
=={{header|FutureBasic}}==
<syntaxhighlight lang="futurebasic">include "NSLog.incl"
 
void local fn DoIt
CFStringRef string = @"abcdefghijklmnopqrstuvwxyz"
NSLog(@"%@",mid(string,3,6))
NSLog(@"%@",fn StringSubstringFromIndex( string, 10 ))
NSLog(@"%@",left(string,len(string)-1))
CFRange range = fn StringRangeOfString( string, @"r" )
NSLog(@"%@",mid(string,range.location,6))
range = fn StringRangeOfString( string, @"pqr" )
NSLog(@"%@",mid(string,range.location,7))
end fn
 
fn DoIt
 
HandleEvents</syntaxhighlight>
 
{{out}}
<pre>
defghi
klmnopqrstuvwxyz
abcdefghijklmnopqrstuvwxy
rstuvw
pqrstuv
</pre>
 
416

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.