Closed cg-cnu closed 6 years ago
I merged, but there's actually still a bug in there that needs to be fixed (it was there before your commit).
text.substring(
text.length - (trailingCharacterCount + 1),
text.length - 1
);
This omits the last character because substring only returns the string until the n-th character (excluding it).
Please create a follow-up issue to the community to fix this.
I would suggest using slice
instead of substring
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice
Refactored truncate function and formatted it as mentioned in https://github.com/DAVFoundation/xplore/pull/68