question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Repeating Characters

See original GitHub issue

In a chance.string is there an option to ensure that there are never any repeating characters in the output?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
spencerthayercommented, Jun 18, 2017

Dude! Thank you so much! This script now produces super strong passwords when I provide a poolString like abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*_-=+~()[]{};:'",.<>?/\|¡¢£¤¥¦§¨©ª®°±µ¿. But more importantly, the user can select the characters they want programmatically and never get a repeating character.

if (passType == "password") {
        function uniqueString(len) {
            return chanceHash.unique(chance.character, len, { pool: poolString }).join('')
        }
        domainPassword = uniqueString(charLength);
    }
0reactions
spencerthayercommented, Jun 18, 2017

I do look forward to seeing what you do with String and maybe making it more efficient but this is totally closed in my book.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Restriction of Repeated Characters for Passwords ... - IBM
The Restriction of Repeated Characters for Passwords (QPWDLMTREP) system value limits the use of repeating characters in a password.
Read more >
Find the first repeated character in a string - GeeksforGeeks
Given a string, find the first repeated character in it. We need to find the character that occurs more than once and whose...
Read more >
Learn Regular Expressions - Lesson 6: Catching some zzz's
Try writing a pattern that matches only the first two spellings by using the curly brace notation above. Exercise 6: Matching repeated characters....
Read more >
Longest Repeating Character Replacement - LeetCode
You can choose any character of the string and change it to any other uppercase English character. You can perform this operation at...
Read more >
Longest Repeating Character Replacement - Leetcode 424
https://neetcode.io/ - A better way to prepare for Coding Interviews Twitter: https://twitter.com/neetcode1 Discord: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found