Latest Changes

Differences between version EMPTY and #9318

0a1,25
> A c++ style string creation function. Objective-C more exactly, don't know the c++ exact annotation 
> <code haxe>
> public static function stringWithFormat (str:String, arr:Array<Dynamic>) :String {
> 	var str_arr = str.split ("%@");
> 	var str_buf :StringBuf = new StringBuf();
> 		
> 	for (i in 0...str_arr.length) {
> 		str_buf.add ( str_arr[i] );
> 		if (arr[i] != null)
> 		str_buf.add ( arr[i] );
> 	}
> 		
> 	return str_buf.toString();
> }
> </code>
> 
> Usage:
> <code haxe>
> stringWithFormat("stringWithFormat %@ %@, %@->>>%@", [1, 2, "hahaha", "yo"]);
> </code>
> 
> Result:
> <code haxe>
> stringWithFormat 1 2, hahaha->>>yo
> </code>
\ No newline at end of file

	
Ver Date Entry Lg User Action
#18057 2013-04-27 07:39:01 doc/start/objc en cristibaluta View | Diff
#18056 2013-04-27 07:39:01 doc/start/objc en cristibaluta Set title to Getting started with Haxe/ObjC
#15549 2012-10-08 10:02:09 download/make en cristibaluta View | Diff
#12654 2012-03-28 12:52:06 doc/snip/selective_trace en cristibaluta View | Diff
#10766 2011-07-21 17:03:35 com/showcase en cristibaluta View | Diff
#10765 2011-07-21 17:02:09 com/showcase en cristibaluta View | Diff
#10406 2011-04-06 16:32:31 download en cristibaluta View | Diff
#10405 2011-04-06 16:30:40 download en cristibaluta View | Diff
#9319 2010-10-18 12:07:40 doc/snip/stringwithformat en cristibaluta Set title to stringWithFormat
#9318 2010-10-18 12:06:04 doc/snip/stringwithformat en cristibaluta View | Diff
#8475 2010-05-28 10:23:24 doc/js/ajax en cristibaluta View | Diff
#6827 2009-08-20 06:23:26 doc/snip/lequation en cristibaluta View | Diff
#6820 2009-08-19 11:40:46 doc/snip/lequation en cristibaluta View | Diff
#6819 2009-08-19 11:16:35 doc/snip/lequation en cristibaluta View | Diff
#6818 2009-08-19 11:15:17 doc/snip/lequation en cristibaluta View | Diff
#6774 2009-08-18 23:11:59 doc/snip/lequation en cristibaluta View | Diff
#6773 2009-08-18 23:11:59 doc/snip/lequation en cristibaluta Set title to Equation of a straight line
#6772 2009-08-18 22:44:35 doc/snip/saferemove en cristibaluta View | Diff
#6771 2009-08-18 22:44:35 doc/snip/saferemove en cristibaluta Set title to Safe remove

Previous | Next