-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal: string().truncate() #833
Comments
Basically you are asking for a |
Exactly |
JamesAnthonyPino
added a commit
to JamesAnthonyPino/joi
that referenced
this issue
May 11, 2016
This is a fix for proposing to add truncate() to string(). This works like max(), only it actually modifies the string to the specified limit. Unit tests are also added.
JamesAnthonyPino
added a commit
to JamesAnthonyPino/joi
that referenced
this issue
May 11, 2016
All tests passed locally at 100% coverage, no warnings.
Closed
Marsup
added a commit
that referenced
this issue
May 28, 2016
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
(I'm not using the issue template because I'm not reporting a bug)
Since we already have .trim(), .uppercase() and .lowercase() modifying the original strings, a .truncate(length) method would be very useful.
The text was updated successfully, but these errors were encountered: