Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
text/template: add a slice function to the predefined global functions #30153
I'm suggesting to add a function named
Would three-index slice expressions be supported, such as
Do you have any data or research to back the need/popularity of such a builtin function? We do have
I don't think the three-index form is a real use case for templates.
I didn't do any research before, just came up with my real use case. I use templates extensively, and many times find it missing for slicing/substring strings and slices.
Little searching in the web, led to find these few links:
Anyway, I don't mind leave it open and see what others think about this.