Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[String] allow passing a string of custom characters to ByteString::fromRandom#36471

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:masterfromazjezz:rand-string-chars
May 5, 2020

Conversation

azjezz
Copy link
Contributor

QA
Branch?master
Bug fix?no
New feature?yes/
Deprecations?no
LicenseMIT
Doc PRsymfony/symfony-docs#...

@nicolas-grekasnicolas-grekas added this to thenext milestoneApr 16, 2020
@azjezzazjezzforce-pushed therand-string-chars branch 3 times, most recently from669bb22 to9f8878fCompareApril 16, 2020 18:31
Copy link
Member

@nicolas-grekasnicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thanks, here are some early random comments :)

// Worst case, it is 2^k + 1, which means we need (k+1) bits and we
// have around a 50% chance of missing as k gets larger
if ($index < $alphabet_size) {
$ret .= $alphabet[$index];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

funny idea: move the function on the base class and allow "characters" to be either code points and/or grapheme clusters, depending on what chunk() returns

sstok reacted with eyes emoji
@nicolas-grekasnicolas-grekas modified the milestones:next,5.1May 4, 2020
Copy link
Member

@nicolas-grekasnicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

let's go and improve during the betas if there is something to improve

@fabpot
Copy link
Member

Thank you@azjezz.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
5.1
Development

Successfully merging this pull request may close these issues.

4 participants
@azjezz@fabpot@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp