Jump to content

String interpolation (included): Difference between revisions

m
(Added more general multi-field interpolation function for APL)
Line 633:
 
∇r ← s sInterp sv
⍝⍝ \briefInterpolate Aitems multi-fieldin sv into s (string interpolationfield functionsubstitution)
⍝ s: string - format string, '_' (underscore) interpolation points
⍝⍝
⍝⍝ \param[⍵]sv: vector - vector of stringsitems to interpolate into s
⍝⍝ \param[⍺] - format string
⍝⍝ ]return r -: interpolated string
⍝⍝ \param[⍵] - vector of strings to interpolate into s
⍝⍝ ]return r - interpolated string
⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝⍝
s[('_'=s)/⍳⍴s] ← ⊃¨sv
r ← ∊s
67

edits

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