Scriban is a templating language for parsing text documents in .NET.
Questions tagged [scriban]
32 questions
0
votes
1 answer
Why I cannot get size of the string returned from function in scriban?
I am testing following code in scriban:
{{ func getString }}text{{ end }}
However when I try to get text length with:
{{ getString | string.size }}
I always get 0, whereas I expect 4. Why is this?

mr100
- 4,340
- 2
- 26
- 38
0
votes
1 answer
How to convert double to integer in scriban
I am trying to use '*' operator in scriban to have a string being concatenated several times like this:
{{
number = 4 / 2
'text' * number
}}
However this gives me an exception: Operator * is not supported for the expression. Only working on…

mr100
- 4,340
- 2
- 26
- 38