Skip to content

Added support for buffer length#191

Closed
martinheidegger wants to merge 19 commits intohapijs:masterfrom
martinheidegger:patch-1
Closed

Added support for buffer length#191
martinheidegger wants to merge 19 commits intohapijs:masterfrom
martinheidegger:patch-1

Conversation

@martinheidegger
Copy link
Contributor

utf-8 strings can have 1 and 2 byte characters. Some - if not many - systems have a byte limit, not a length limit thus it might be important to actually set the byte limit. I added three methods that should offer this possibility.

@hueniverse
Copy link
Contributor

I am not sure how useful this is, but I am willing to consider adding a single method bytes(min, max) where min or max can be undefined or equal. Also, please add docs and tests.

@martinheidegger
Copy link
Contributor Author

I think I messed up the git structure (very sorry for that). Can you use the patch still?

@hueniverse
Copy link
Contributor

Can you bring this up to speed with the current master branch? Might be easier to manually do a new pull request than keep patching this one, using the existing work.

@hueniverse hueniverse self-assigned this Apr 17, 2014
@hueniverse hueniverse added this to the 4.0.0 milestone Apr 17, 2014
@hueniverse
Copy link
Contributor

Also, doesn't this require specifying an encoding format to calculate bytes size?

@hueniverse hueniverse removed this from the 4.0.0 milestone Apr 22, 2014
@hueniverse hueniverse added this to the 4.0.0 milestone Apr 22, 2014
@hueniverse
Copy link
Contributor

Decided to implement as an attribute of the existing rules.

@martinheidegger martinheidegger deleted the patch-1 branch April 28, 2014 06:26
@lock
Copy link

lock bot commented Jan 9, 2020

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.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

feature New functionality or improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants