Closed Andras-Csanyi closed 1 year ago
@Andras-Csanyi Yes you can add this, also add a unit test to test the helper itself and to test the helper in a template.
@Andras-Csanyi If you have time, you can copy here the markdown for the changes for the wiki page: https://github.com/Handlebars-Net/Handlebars.Net.Helpers/wiki/String
@Andras-Csanyi If you have time, you can copy here the markdown for the changes for the wiki page: https://github.com/Handlebars-Net/Handlebars.Net.Helpers/wiki/String
Ok, I'll do it later today. Thanks!
The doc part:
Summary | Retrieves a substring from the original string |
Returns | Substring portion |
Remarks | Behavior of parameters follows String.Substring() behavior |
Parameters | |
str | Base string |
start | Start position of the substring |
length | Length of the string (optional) |
Context
{
"value": "Lorem ipsum dolor sit amet"
}
Usage
<strong>result:</strong>
{{String.Substring value 1 3}}
{{String.Substring "Lorem" 1 }}
Returns
<strong>result:</strong>
ore
orem
Hi All,
I'm using this package and I like it very much, however, I miss the String.Substring helper. Should I feel free to open a pull request containing this helper? Is there anything I need to be aware of which is contribution related beside the usual things? Usual things: clone the repo, create your branch, make your changes, test them and open the PR, etc...