Allow using collection accessors on strings (#245)

* allow using collection accessors on strings

* refactored resolving collection accessors

* refactored to fileprivate function

* Update Variable.swift

* Update templates.rst
This commit is contained in:
Ilya Puchka
2018-09-22 16:41:45 +03:00
committed by GitHub
parent df2e193891
commit d238c25eef
4 changed files with 109 additions and 47 deletions

View File

@@ -26,6 +26,10 @@
[Ilya Puchka](https://github.com/ilyapuchka)
[#243](https://github.com/stencilproject/Stencil/pull/243)
- Now you can access string characters by index or get string length the same was as if it was an array, i.e. `{{ 'string'.first }}`, `{{ 'string'.last }}`, `{{ 'string'.1 }}`, `{{ 'string'.count }}`.
[Ilya Puchka](https://github.com/ilyapuchka)
[#245](https://github.com/stencilproject/Stencil/pull/245)
### Internal Changes
- Updated the codebase to use Swift 4 features.