Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

198
Visualizações
Is there a Unicode character that acts like a backspace or is invisible?

I was messing around with strings of random Unicode characters. I generated two different string that both had the same length. They were both populated with random Unicode characters between 0 and 255. I noticed after I ran the program the length of one string was different than the other. Dose anyone know if there is an invisible character or character that deletes there character before it in Unicode?

//coded in javascript but the native language is Java
function generate(text) {
  //create an decode key array
  let decodeKey = [];
  for (let i = 0; i < text.length * 2; i++) {
    decodeKey.push(Math.floor(Math.random() * 10));
  }
  let binary = [];
  for (let i = 0; i < text.length; i++) {
    //turn text to binary and split at every 4th character
    let b = text.charCodeAt(i).toString(2);
    while (b.length < 8) {
      b = "0" + b;
    }
    binary.push(b.slice(0, 4));
    binary.push(b.slice(3));
  }
  //convert binary to a number and multiply by the decode key
  let nums = [];
  for (let i = 0; i < binary.length; i++) {
    nums.push(parseInt(binary[i].toString(10)) * decodeKey[i]);
  }
  //convert nums to unicode
  let uniChars = [];
  for (let i = 0; i < nums.length; i++) {
    uniChars.push(String.fromCharCode(parseInt(nums[i])));
  }
  //create final string with decode key at the bottom
  let result = "";
  for (let i = 0; i < uniChars.length; i++) {
    result += uniChars[i];
  }
  result += "\n"
  for (let i = 0; i < decodeKey.length; i++) {
    result += String.fromCharCode(decodeKey[i]);
  }
  //return the result
  return result;
}

console.log(generate("Test / Sample Text, Test / Sample Text, Test / Sample Text, Test / Sample Text"));

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda