Diff
checker
Testo
Testo
Immagini
Documenti
Excel
Cartelle
Legal
Enterprise
Applicazione per desktop
Prezzi
Accedi
Scarica Diffchecker Desktop
Confronta il testo
Trova la differenza tra due file di testo
Strumenti
Cronologia
Editor live
Nascondi spazi bianchi
Comprimi invariate
Senza a capo
Layout
Diviso
Unificato
Livello di dettaglio
Intelligente
Parola
Carattere
Stili testo
Modifica aspetto
Evidenziazione sintassi
Scegli sintassi
Ignora
Trasforma testo
Vai alla prima modifica
Modifica input
Diffchecker Desktop
Il modo più sicuro per usare Diffchecker. Ottieni l'app Diffchecker Desktop: i tuoi diff non lasciano mai il tuo computer!
Ottieni Desktop
Untitled diff
Creato
11 anni fa
Il diff non scade mai
Eliminare
Esporta
Condividere
Spiegare
4 rimozioni
Linee
Totale
Rimosso
Caratteri
Totale
Rimosso
Per continuare a utilizzare questa funzione, aggiorna a
Diff
checker
Pro
Visualizza prezzi
39 linee
Copia tutti
6 aggiunte
Linee
Totale
Aggiunto
Caratteri
Totale
Aggiunto
Per continuare a utilizzare questa funzione, aggiorna a
Diff
checker
Pro
Visualizza prezzi
41 linee
Copia tutti
static string insert(string text, string wort, int pos)
static string insert(string text, string wort, int pos)
{
{
if (pos == 0)
if (pos == 0)
{
{
return wort + " " + text;
return wort + " " + text;
}
}
string newtext = "";
string newtext = "";
int spacecount = 0;
int spacecount = 0;
bool inserted = false;
bool inserted = false;
for (int i = 0; i < text.Length; i++)
for (int i = 0; i < text.Length; i++)
{
{
newtext += text[i];
newtext += text[i];
if (inserted == false)
if (inserted == false)
{
{
Copia
Copiato
Copia
Copiato
if (pos > spacecount)
{
return wort + " " + text;
}
if (text[i] == ' ')
if (text[i] == ' ')
{
{
spacecount++;
spacecount++;
}
}
if (spacecount == pos)
if (spacecount == pos)
{
{
newtext += wort + " ";
newtext += wort + " ";
inserted = true;
inserted = true;
}
}
}
}
}
}
Copia
Copiato
Copia
Copiato
if (pos > spacecount)
{
return text + " " + wort;
}
return newtext;
return newtext;
}
}
Diff salvati
Testo originale
Apri file
static string insert(string text, string wort, int pos) { if (pos == 0) { return wort + " " + text; } string newtext = ""; int spacecount = 0; bool inserted = false; for (int i = 0; i < text.Length; i++) { newtext += text[i]; if (inserted == false) { if (pos > spacecount) { return wort + " " + text; } if (text[i] == ' ') { spacecount++; } if (spacecount == pos) { newtext += wort + " "; inserted = true; } } } return newtext; }
Testo modificato
Apri file
static string insert(string text, string wort, int pos) { if (pos == 0) { return wort + " " + text; } string newtext = ""; int spacecount = 0; bool inserted = false; for (int i = 0; i < text.Length; i++) { newtext += text[i]; if (inserted == false) { if (text[i] == ' ') { spacecount++; } if (spacecount == pos) { newtext += wort + " "; inserted = true; } } } if (pos > spacecount) { return text + " " + wort; } return newtext; }
Trovare la differenza