-
Notifications
You must be signed in to change notification settings - Fork 21
/
mustache.html
470 lines (417 loc) · 22.6 KB
/
mustache.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang='en'>
<!--
Copyright (c) 1999-2010 by Digital Mars
All Rights Reserved Written by Walter Bright
http://www.digitalmars.com
-->
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" >
<title>mustache - D Programming Language - Digital Mars</title>
<link rel="stylesheet" type="text/css" href="../css/style.css">
<script type="text/javascript">
function listanchors()
{
if (typeof inhibitQuickIndex !== 'undefined') return;
var a = document.getElementById("quickindex");
if (!a) return;
var newText = "";
var hash = new Array;
var n = 0;
var values = new Array;
// List all anchors.
for (var i = 0; i < document.anchors.length; i++)
{
var a = document.anchors[i];
var text = a.name;
if (hash[text] > 0) continue;
hash[text] = 1;
values[n++] = a.name
}
values.sort();
for(var i = 0; i < values.length; i++) {
var a = values[i];
newText += ' \x3Ca href="\x23' + a +
'"\x3E\x3Cspan class="d_psymbol"\x3E' + a + '\x3C/span\x3E\x3C/a\x3E';
}
if (newText != "") newText = "\x3Cp\x3E\x3Cb\x3EJump to:\x3C/b\x3E" + newText + "\x3C/p\x3E";
var a = document.getElementById("quickindex");
a.innerHTML = newText;
}
</script>
<script src="/js/hyphenate_selectively.js" type="text/javascript"></script>
</head>
<body onload="listanchors()" class='hyphenate'>
<div id="top">
<div id="search-box">
<form method="get" action="http://google.com/search">
<img src="/images/search-left.gif" width="11" height="22" alt=""><input id="q" name="q"><input type="image" id="search-submit" name="submit" src="/images/search-button.gif">
<input type="hidden" id="domains" name="domains" value="d-programming-language.org">
<input type="hidden" id="sourceid" name="sourceid" value="google-search">
<div id="search-dropdown">
<select id="sitesearch" name="sitesearch" size="1">
<option value="d-programming-language.org">Entire D Site</option>
<option value="d-programming-language.org/phobos">Library Reference</option>
<option value="www.digitalmars.com/d/archives">Newsgroup Archives</option>
</select>
</div>
</form>
</div>
<div id="header">
<a href="/"><img id="logo" width="125" height="95" border="0" alt="D Logo" src="/images/dlogo.png"></a>
<a id="d-language" href="/">D Programming Language </a>
</div>
</div>
<div id="navigation">
<div class="navblock">
<form method="get" action="http://www.google.com/search">
<div id="searchbox">
<input name="q" size="10" value="RTL Search" onFocus='if(this.value == "RTL Search"){this.value="";}'>
<input type="hidden" name="domains" value="www.digitalmars.com">
<input type="hidden" name="sitesearch" value="www.digitalmars.com/d/2.0/phobos">
<input type="hidden" name="sourceid" value="google-search">
<input type="submit" name="submit" value="Go">
</div>
</form>
<div id="toctop">
<ul><li><a href="../index.html" title="D Programming Language">D</a></li>
<li><a href="../spec.html" title="D Language Specification">Language</a></li>
<li><a href="../phobos/index.html" title="D Runtime Library">Phobos</a></li>
<li><a href="../phobos-prerelease/index.html" title="D Runtime Library (prerelease)">Phobos (prerelease)</a></li>
<li><a href="../comparison.html" title="Language Comparisons">Comparisons</a></li>
</ul>
</div>
</div>
<div class="navblock">
<ul><li><a href="object.html" title="root of object hierarchy">object</a></li>
</ul>
<h2><a href="index.html#std" title="D standard modules">std</a></h2>
<ul><li><a href="std_algorithm.html" title="General-purpose algorithms">std.algorithm</a></li>
<li><a href="std_array.html" title="Array functions">std.array</a></li>
<li><a href="std_ascii.html" title="Functions which operate on ASCII characters">std.ascii</a></li>
<li><a href="std_base64.html" title="Encode/decode base64 format">std.base64</a></li>
<li><a href="std_bigint.html" title="Arbitrary-precision ('bignum') arithmetic">std.bigint</a></li>
<li><a href="std_bitmanip.html" title="Bit-level manipulation">std.bitmanip</a></li>
<li><a href="std_compiler.html" title="Information about the D compiler implementation">std.compiler</a></li>
<li><a href="std_complex.html" title="Complex numbers">std.complex</a></li>
<li><a href="std_concurrency.html" title="Message Passing">std.concurrency</a></li>
<li><a href="std_container.html" title="Containers">std.container</a></li>
<li><a href="std_contracts.html" title="Think assert">std.contracts</a></li>
<li><a href="std_conv.html" title="Conversion of strings to integers">std.conv</a></li>
<li><a href="std_cpuid.html" title="CPU identification">std.cpuid</a></li>
<li><a href="std_ctype.html" title="Simple character classification">std.ctype</a></li>
<li><a href="std_date.html" title="Date and time functions">std.date</a></li>
<li><a href="std_datetime.html" title="Date and time-related types and functions">std.datetime</a></li>
<li><a href="std_demangle.html" title="Demangle D names">std.demangle</a></li>
<li><a href="std_encoding.html" title="Character and string encoding">std.encoding</a></li>
<li><a href="std_exception.html" title="Exceptions and error handling">std.exception</a></li>
<li><a href="std_file.html" title="Basic file operations">std.file</a></li>
<li><a href="std_format.html" title="Formatted conversions of values to strings">std.format</a></li>
<li><a href="std_functional.html" title="functional">std.functional</a></li>
<li><a href="std_getopt.html" title="Command line options">std.getopt</a></li>
<li><a href="std_gregorian.html" title="Gregorian Calendar">std.gregorian</a></li>
<li><a href="std_json.html" title="JSON reader">std.json</a></li>
<li><a href="std_math.html" title="the usual math functions">std.math</a></li>
<li><a href="std_mathspecial.html" title="mathematical special functions">std.mathspecial</a></li>
<li><a href="std_md5.html" title="Compute MD5 digests">std.md5</a></li>
<li><a href="std_metastrings.html" title="Metaprogramming with strings">std.metastrings</a></li>
<li><a href="std_mmfile.html" title="Memory mapped files">std.mmfile</a></li>
<li><a href="std_numeric.html" title="Numeric algorithms">std.numeric</a></li>
<li><a href="std_outbuffer.html" title="Assemble data into an array of bytes">std.outbuffer</a></li>
<li><a href="std_parallelism.html" title="High-level primitives for SMP parallelism">std.parallelism</a></li>
<li><a href="std_path.html" title="Manipulate file names, path names, etc.">std.path</a></li>
<li><a href="std_process.html" title="Create/destroy processes">std.process</a></li>
<li><a href="std_random.html" title="Random number generation">std.random</a></li>
<li><a href="std_range.html" title="Ranges">std.range</a></li>
<li><a href="std_regex.html" title="regular expressions">std.regex</a></li>
<li><a href="std_regexp.html" title="regular expressions (deprecated)">std.regexp</a></li>
<li><a href="std_signals.html" title="Signals">std.signals</a></li>
<li><a href="std_socket.html" title="Sockets">std.socket</a></li>
<li><a href="std_socketstream.html" title="Stream for a blocking, connected Socket">std.socketstream</a></li>
<li><a href="std_stdint.html" title="Integral types for various purposes">std.stdint</a></li>
<li><a href="std_stdio.html" title="Standard I/O">std.stdio</a></li>
<li><a href="std_cstream.html" title="Stream I/O">std.cstream</a></li>
<li><a href="std_stream.html" title="Stream I/O">std.stream</a></li>
<li><a href="std_string.html" title="Basic string operations">std.string</a></li>
<li><a href="std_system.html" title="Inquire about the CPU, operating system">std.system</a></li>
<li><a href="std_traits.html" title="Type traits">std.traits</a></li>
<li><a href="std_typecons.html" title="Type constructors">std.typecons</a></li>
<li><a href="std_typetuple.html" title="Type tuples">std.typetuple</a></li>
<li><a href="std_uni.html" title="Unicode classification">std.uni</a></li>
<li><a href="std_uri.html" title="Encode and decode Uniform Resource Identifiers (URIs)">std.uri</a></li>
<li><a href="std_utf.html" title="Encode and decode utf character encodings">std.utf</a></li>
<li><a href="std_variant.html" title="Stores all types in a uniform, dynamically-checked representation">std.variant</a></li>
<li><a href="std_xml.html" title="XML file processing">std.xml</a></li>
<li><a href="std_zip.html" title="Read/write zip archives">std.zip</a></li>
<li><a href="std_zlib.html" title="Compression / Decompression of data">std.zlib</a></li>
<li><a href="std_c_fenv.html" title="Floating point environment">std.c.fenv</a></li>
<li><a href="std_c_locale.html" title="Locale">std.c.locale</a></li>
<li><a href="std_c_math.html" title="Math">std.c.math</a></li>
<li><a href="std_c_process.html" title="Process">std.c.process</a></li>
<li><a href="std_c_stdarg.html" title="Variadic arguments">std.c.stdarg</a></li>
<li><a href="std_c_stddef.html" title="Standard definitions">std.c.stddef</a></li>
<li><a href="std_c_stdio.html" title="Standard I/O">std.c.stdio</a></li>
<li><a href="std_c_stdlib.html" title="Standard library">std.c.stdlib</a></li>
<li><a href="std_c_string.html" title="Strings">std.c.string</a></li>
<li><a href="std_c_time.html" title="Time">std.c.time</a></li>
<li><a href="std_c_wcharh.html" title="Wide characters">std.c.wcharh</a></li>
<li><a href="std_net_isemail.html" title="Validate e-mail addresses">std.net.isemail</a></li>
<li><a href="std_windows_charset.html" title="Conversion to/from Windows character sets">std.windows.charset</a></li>
<li><a href="index.html#std_windows" title="Modules specific to Windows">std.windows</a></li>
<li><a href="index.html#std_linux" title="Modules specific to Windows">std.linux</a></li>
<li><a href="index.html#std_c_windows" title="C Windows API">std.c.windows</a></li>
<li><a href="index.html#std_c_linux" title="C Linux API">std.c.linux</a></li>
</ul>
<h2><a href="index.html#etc" title="D etc modules">etc</a></h2>
<ul><li><a href="etc_c_curl.html" title="Interface to libcurl library">etc.c.curl</a></li>
<li><a href="etc_c_zlib.html" title="Interface to zlib library">etc.c.zlib</a></li>
</ul>
<h2><a href="index.html#core" title="D core modules">core</a></h2>
<ul><li><a href="core_atomic.html" title="Atomic operations">core.atomic</a></li>
<li><a href="core_bitop.html" title="Bitwise operations">core.bitop</a></li>
<li><a href="core_cpuid.html" title="CPU identification">core.cpuid</a></li>
<li><a href="core_exception.html" title="Root of exception hierarchy">core.exception</a></li>
<li><a href="core_memory.html" title="Interface to memory management">core.memory</a></li>
<li><a href="core_runtime.html" title="Interface to D runtime library internals">core.runtime</a></li>
<li><a href="core_thread.html" title="Thread management">core.thread</a></li>
<li><a href="core_time.html" title="Core time functionality">core.time</a></li>
<li><a href="core_vararg.html" title="Variable function arguments">core.vararg</a></li>
<li><a href="core_sync_barrier.html" title="Synchronizing progress of a group of threads">core.sync.barrier</a></li>
<li><a href="core_sync_condition.html" title="Synchronized condition checking">core.sync.condition</a></li>
<li><a href="core_sync_config.html" title="Stuff for core.sync">core.sync.config</a></li>
<li><a href="core_sync_exception.html" title="SyncException">core.sync.exception</a></li>
<li><a href="core_sync_mutex.html" title="Mutexes">core.sync.mutex</a></li>
<li><a href="core_sync_rwmutex.html" title="R/W mutually exclusive access">core.sync.rwmutex</a></li>
<li><a href="core_sync_semaphore.html" title="Semaphores">core.sync.semaphore</a></li>
</ul>
</div>
</div>
<div id="content">
<h1>mustache</h1>
<div id=quickindex class=quickindex></div>
<!-- Generated by Ddoc from src/mustache.d -->
Mustache template engine for D
<p></p>
Implemented according to <a href="http://mustache.github.com/mustache.5.html">mustach(5)</a>.
<p></p>
<b>License:</b><br><a href="http://www.boost.org/LICENSE_1_0.txt">Boost License 1.0</a>.
<p></p>
<b>Authors:</b><br>Masahiro Nakagawa<p></p>
<dl><dt class="d_decl">class <a name="MustacheException"></a><span class="ddoc_psymbol">MustacheException</span>: object.Exception;
</dt>
<dd>Exception for Mustache<p></p>
</dd>
<dt class="d_decl">struct <a name="MustacheEngine"></a><span class="ddoc_psymbol">MustacheEngine</span>(String = string) if (isSomeString!(String));
</dt>
<dd>Core implementation of Mustache
<p></p>
<span class="d_param">String</span> parameter means a string type to render.
<p></p>
<b>Example:</b><br>
<pre class="d_code"> <span class="d_keyword">alias</span> <span class="d_psymbol">MustacheEngine</span>!(string) Mustache;
Mustache mustache;
<span class="d_keyword">auto</span> context = <span class="d_keyword">new</span> Mustache.Context;
context[<span class="d_string">"name"</span>] = <span class="d_string">"Chris"</span>;
context[<span class="d_string">"value"</span>] = 10000;
context[<span class="d_string">"taxed_value"</span>] = 10000 - (10000 * 0.4);
context.useSection(<span class="d_string">"in_ca"</span>);
write(mustache.render(<span class="d_string">"sample"</span>, context));
</pre>
sample.mustache:
<pre class="d_code"> Hello {{name}}
You have just won ${{value}}!
{{#in_ca}}
Well, ${{taxed_value}}, after taxes.
{{/in_ca}}
</pre>
<p></p>
<b>Output:</b><br>
<pre class="d_code"> Hello Chris
You have just won 0000!
Well, 000, after taxes.
</pre>
<p></p>
<dl><dt class="d_decl">enum <a name="CacheLevel"></a><span class="ddoc_psymbol">CacheLevel</span>;
</dt>
<dd>Cache level for compile result<p></p>
<dl><dt class="d_decl"><a name="no"></a><span class="ddoc_psymbol">no</span></dt>
<dd>No caching<p></p>
</dd>
<dt class="d_decl"><a name="check"></a><span class="ddoc_psymbol">check</span></dt>
<dd>Caches compiled result and checks the freshness of template<p></p>
</dd>
<dt class="d_decl"><a name="once"></a><span class="ddoc_psymbol">once</span></dt>
<dd>Caches compiled result but not check the freshness of template<p></p>
</dd>
</dl>
</dd>
<dt class="d_decl">struct <a name="Option"></a><span class="ddoc_psymbol">Option</span>;
</dt>
<dd>Options for rendering<p></p>
<dl><dt class="d_decl">string <a name="ext"></a><span class="ddoc_psymbol">ext</span>;
</dt>
<dd>template file extenstion<p></p>
</dd>
<dt class="d_decl">string <a name="path"></a><span class="ddoc_psymbol">path</span>;
</dt>
<dd>root <a name="path"></a><span class="ddoc_psymbol">path</span> for template file searching<p></p>
</dd>
<dt class="d_decl">CacheLevel <a name="level"></a><span class="ddoc_psymbol">level</span>;
</dt>
<dd>See CacheLevel<p></p>
</dd>
<dt class="d_decl">Handler <a name="handler"></a><span class="ddoc_psymbol">handler</span>;
</dt>
<dd>Callback <a name="handler"></a><span class="ddoc_psymbol">handler</span> for unknown name<p></p>
</dd>
</dl>
</dd>
<dt class="d_decl">class <a name="Context"></a><span class="ddoc_psymbol">Context</span>;
</dt>
<dd>Mustache context for setting values
<p></p>
<b>Variable:</b><br>
<pre class="d_code"> <span class="d_comment">//{{name}} to "Chris"
</span> context[<span class="d_string">"name"</span>] = <span class="d_string">"Chirs"</span>
</pre>
Lists section("addSubContext" name is drived from ctemplate's API):
<pre class="d_code"> <span class="d_comment">//{{#repo}}
</span> <span class="d_comment">//<b>{{name}}</b>
</span> <span class="d_comment">//{{/repo}}
</span> <span class="d_comment">// to
</span> <span class="d_comment">//<b>resque</b>
</span> <span class="d_comment">//<b>hub</b>
</span> <span class="d_comment">//<b>rip</b>
</span> <span class="d_keyword">foreach</span> (name; [<span class="d_string">"resque"</span>, <span class="d_string">"hub"</span>, <span class="d_string">"rip"</span>]) {
<span class="d_keyword">auto</span> sub = context.addSubContext(<span class="d_string">"repo"</span>);
sub[<span class="d_string">"name"</span>] = name;
}
</pre>
Variable section:
<pre class="d_code"> <span class="d_comment">//{{#person?}}Hi {{name}}{{/person?}} to "Hi Jon"
</span> context[<span class="d_string">"person?"</span>] = [<span class="d_string">"name"</span> : <span class="d_string">"Jon"</span>];
</pre>
Lambdas section:
<pre class="d_code"> <span class="d_comment">//{{#wrapped}}awesome{{/wrapped}} to "<b>awesome</b>"
</span> context[<span class="d_string">"Wrapped"</span>] = (string str) { <span class="d_keyword">return</span> <span class="d_string">"<b>"</span> ~ str ~ <span class="d_string">"</b>"</span>; };
</pre>
Inverted section:
<pre class="d_code"> <span class="d_comment">//{{#repo}}<b>{{name}}</b>{{/repo}}
</span> <span class="d_comment">//{{^repo}}No repos :({{/repo}}
</span> <span class="d_comment">// to
</span> <span class="d_comment">//No repos :(
</span> context[<span class="d_string">"foo"</span>] = <span class="d_string">"bar"</span>; <span class="d_comment">// not set to "repo"
</span></pre>
<p></p>
<dl><dt class="d_decl">const nothrow String <a name="opIndex"></a><span class="ddoc_psymbol">opIndex</span>(in String <i>key</i>);
</dt>
<dd>Gets <span class="d_param"><i>key</i></span>'s value. This method does not search Section.
<p></p>
<b>Parameters:</b><table class=parms><tr><td valign=top>String <i>key</i></td>
<td valign=top><i>key</i> string to search</td></tr>
</table><p></p>
<b>Returns:</b><br>a <span class="d_param"><i>key</i></span> associated value.
<p></p>
<b>Throws:</b><br>a RangeError if <span class="d_param"><i>key</i></span> does not exist.<p></p>
</dd>
<dt class="d_decl">void <a name="opIndexAssign"></a><span class="ddoc_psymbol">opIndexAssign</span>(T)(T <i>value</i>, in String <i>key</i>);
</dt>
<dd>Assigns <span class="d_param">value</span>(automatically convert to String) to <span class="d_param">key</span> field.
<p></p>
If you try to assign associative array or delegate,
This method assigns <span class="d_param">value</span> as Section.
<p></p>
<b>Parameters:</b><table class=parms><tr><td valign=top>value</td>
<td valign=top>some type value to assign</td></tr>
<tr><td valign=top>key</td>
<td valign=top>key string to assign</td></tr>
</table><p></p>
</dd>
<dt class="d_decl">void <a name="useSection"></a><span class="ddoc_psymbol">useSection</span>(in String <i>key</i>);
</dt>
<dd>Enable <span class="d_param"><i>key</i></span>'s section.
<p></p>
<b>Parameters:</b><table class=parms><tr><td valign=top>String <i>key</i></td>
<td valign=top><i>key</i> string to enable</td></tr>
</table><p></p>
<b>NOTE:</b><br>
I don't like this method, but D's typing can't well-handle Ruby's typing.<p></p>
</dd>
<dt class="d_decl">Context <a name="addSubContext"></a><span class="ddoc_psymbol">addSubContext</span>(in String <i>key</i>, lazy size_t <i>size</i> = 1);
</dt>
<dd>Adds new context to <span class="d_param"><i>key</i></span>'s section. This method overwrites with
list type if you already assigned other type to <span class="d_param"><i>key</i></span>'s section.
<p></p>
<b>Parameters:</b><table class=parms><tr><td valign=top>String <i>key</i></td>
<td valign=top><i>key</i> string to add</td></tr>
<tr><td valign=top>size_t <i>size</i></td>
<td valign=top>reserve <i>size</i> for avoiding reallocation</td></tr>
</table><p></p>
<b>Returns:</b><br>new Context object that added to <span class="d_param"><i>key</i></span> section list.<p></p>
</dd>
</dl>
</dd>
<dt class="d_decl">const const(string) <a name="ext"></a><span class="ddoc_psymbol">ext</span>();
<br>void <a name="ext"></a><span class="ddoc_psymbol">ext</span>(string <a name="ext"></a><span class="ddoc_psymbol">ext</span>);
</dt>
<dd>Property for template extenstion<p></p>
</dd>
<dt class="d_decl">const const(string) <a name="path"></a><span class="ddoc_psymbol">path</span>();
<br>void <a name="path"></a><span class="ddoc_psymbol">path</span>(string <a name="path"></a><span class="ddoc_psymbol">path</span>);
</dt>
<dd>Property for template searche <a name="path"></a><span class="ddoc_psymbol">path</span><p></p>
</dd>
<dt class="d_decl">const const(CacheLevel) <a name="level"></a><span class="ddoc_psymbol">level</span>();
<br>void <a name="level"></a><span class="ddoc_psymbol">level</span>(CacheLevel <a name="level"></a><span class="ddoc_psymbol">level</span>);
</dt>
<dd>Property for cache <a name="level"></a><span class="ddoc_psymbol">level</span><p></p>
</dd>
<dt class="d_decl">const const(Handler) <a name="handler"></a><span class="ddoc_psymbol">handler</span>();
<br>void <a name="handler"></a><span class="ddoc_psymbol">handler</span>(Handler <a name="handler"></a><span class="ddoc_psymbol">handler</span>);
</dt>
<dd>Property for callback <a name="handler"></a><span class="ddoc_psymbol">handler</span><p></p>
</dd>
<dt class="d_decl">String <a name="render"></a><span class="ddoc_psymbol">render</span>(in string <i>name</i>, in Context <i>context</i>);
</dt>
<dd>Renders <span class="d_param"><i>name</i></span> template with <span class="d_param"><i>context</i></span>.
<p></p>
This method stores compile result in memory if you set check or once CacheLevel.
<p></p>
<b>Parameters:</b><table class=parms><tr><td valign=top>string <i>name</i></td>
<td valign=top>template <i>name</i> without extenstion</td></tr>
<tr><td valign=top>Context <i>context</i></td>
<td valign=top>Mustache <i>context</i> for rendering</td></tr>
</table><p></p>
<b>Returns:</b><br>rendered result.
<p></p>
<b>Throws:</b><br>object.Exception if String alignment is mismatched from template file.<p></p>
</dd>
<dt class="d_decl">String <a name="renderString"></a><span class="ddoc_psymbol">renderString</span>(in String <i>src</i>, in Context <i>context</i>);
</dt>
<dd>string version of <span class="d_inlinecode">render</span>.<p></p>
</dd>
</dl>
</dd>
</dl>
<br><br>
<br><br>
<!-- Google ad -->
<script type="text/javascript"><!--
/**/google_ad_client = "pub-5628673096434613";
/**/google_ad_width = 728;
/**/google_ad_height = 90;
/**/google_ad_format = "728x90_as";
/**/google_ad_channel ="6203743411";
/**/google_page_url = document.location;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<div id="copyright">
Copyright Masahiro Nakagawa 2011-.
|
Page generated by <a href="http://www.digitalmars.com/d/2.0/ddoc.html">Ddoc</a>.
</div>
</body>
</html>