Diff
checker
テキスト
テキスト
画像
ドキュメント
Excel
フォルダ
Legal
Enterprise
デスクトップ
料金
ログイン
Diffchecker デスクトップのダウンロード
テキスト比較
2 つのテキスト ファイルの違いを見つける
ツール
履歴
ライブエディター
空白の変更を非表示
未変更行を折りたたむ
折り返しなし
レイアウト
分割
統合
比較精度
スマート
単語
文字
テキストスタイル
外観を変更
シンタックスハイライト
構文を選択
無視
テキスト変換
最初の差分へ移動
入力を編集
Diffchecker Desktop
Diffcheckerを実行する最も安全な方法。Diffchecker Desktopアプリを入手:あなたの差分はコンピューターから出ることはありません!
Desktopを入手
Untitled diff
作成日
11 年前
差分は期限切れになりません
クリア
エクスポート
共有
説明
4 削除
行
合計
削除
文字
合計
削除
この機能を引き続き使用するには、アップグレードしてください
Diff
checker
Pro
価格を見る
39 行
すべてコピー
6 追加
行
合計
追加
文字
合計
追加
この機能を引き続き使用するには、アップグレードしてください
Diff
checker
Pro
価格を見る
41 行
すべてコピー
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)
{
{
コピー
コピー済み
コピー
コピー済み
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;
}
}
}
}
}
}
コピー
コピー済み
コピー
コピー済み
if (pos > spacecount)
{
return text + " " + wort;
}
return newtext;
return newtext;
}
}
保存された差分
原文
ファイルを開く
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; }
変更されたテキスト
ファイルを開く
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; }
違いを見つける