Using U code to generate random garbled names

Aperta
#165 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
android, java

Direzione di ricerca

No project files, tests, or integration point are named. Start by reading the project structure and locating where names are entered or generated; clarify how this feature should fit into the app before making changes. Done should include a way to generate names of a specified length using the Unicode ranges described in the issue, with behavior verified in the relevant tests.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Use a two-dimensional array to store two U code ranges, random generates random numbers to select U code ranges, and loops to generate characters of a specified length to generate obfuscated names.

import java.util.Random;

public class Name_Factory {
private static final int[][] UNICODE_RANGES = {
    {0x0100, 0x017F}, // Latin Extended-A
    {0x0370, 0x03FF}, // Greek and Coptic
    {0x0400, 0x04FF}  // Cyrillic alphabet
};
    public static String generateGlitchName(int length) {
        Random random = new Random();
        StringBuilder glitchName = new StringBuilder();

        for (int i = 0; i < length; i++) {
            // Randomly select a Unicode range
            int[] range = UNICODE_RANGES[random.nextInt(UNICODE_RANGES.length)];
            int start = range[0];
            int end = range[1];

            // Generate a random character
            int codePoint = random.nextInt(end - start + 1) + start;
            glitchName.append(Character.toChars(codePoint));
        }

        return glitchName.toString();
    }   
}
Details

Image

demo.apk.zip

Lingua principale
Java
Stelle
2.3k
Fork
417
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di REAndroid/APKEditor

Tutte le issue di REAndroid/APKEditor

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.