Closed lukzas closed 3 years ago
Yes, surely, sounds as a great improvement! Just that I'll probably have to change the default separator to match with existing implementation of text-to-token-count
.
I might adjust it to use whitespace as default instead of the current character :wink:
Would be great. Looking forward for your contribution.
@lukzas I'd like to make a couple of updates:
text-to-token-count
function(null)
will return 0, would like to return (null)
in place(null)
to have the same kind of behaviour than other text methods.Is it OK for you?
@Seddryck All seem valid points, especially in terms of consistency within the repository. Though the current implementation works for all my use cases and e.g. having support for whitespace other than space is totally unnecessary. Feel free to adjust it as you find most appropriate for the project 😉
Implemented and documented in 1.23.0-beta.161 or on nuget via Update-Package NBi.Framework -version 1.23.0-beta0161
.
I've implemented
text-to-token
native transformation to use in my project. It enables to split string with a default|
separator and select value of the given index, as well as custom one, passed as parameter.Function calls
Example
I've tested it in many different scenarios already as it's handier than the custom
c-sharp
transformation. In case you're interested in adding it to the codebase, let me know and I'll create PR.