Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Follow-up to #2610146: Create API for scrambling methods
Problem/Motivation
Make different methods in order for other modules to make use of these methods.
Proposed resolution
Create methods:
- Shuffle characters
- Shuffle words
- Empty values
API changes
Add scramble methods.
Comments
Comment #2
nico.knaepen CreditAttribution: nico.knaepen at Logic in Motion for Colruyt Group Services commentedComment #4
nico.knaepen CreditAttribution: nico.knaepen at Logic in Motion for Colruyt Group Services commentedComment #5
nico.knaepen CreditAttribution: nico.knaepen at Logic in Motion for Colruyt Group Services commentedComment #6
nico.knaepen CreditAttribution: nico.knaepen at Logic in Motion for Colruyt Group Services commentedCheck the following use case:
What if the word can not be scrambled?
Example: ee, rr, ff
What if the sentence contains two words which are exactly the same?
Example: word word
Avoid having unlimited loops.
Also include unit testing for this part.
Comment #7
nico.knaepen CreditAttribution: nico.knaepen at Logic in Motion for Colruyt Group Services commentedComment #8
nico.knaepen CreditAttribution: nico.knaepen at Logic in Motion for Colruyt Group Services commented