こんにちは私は以下のコードを持っていて、文字列 "メッセージ"にファルシ文字が含まれていてもトーストを使ってメッセージを表示したいが、私のコード? ありがとうございます!ここ文字列配列でアンドロイドで検索
if(message.contains(chr[j]));
P.Sから
int len=message.length();
final String [] chr={ "چ","ج","ح","خ","ه","ع","غ","ف","ق","ث","ص","ض",
"ش","س","ی","ب","ل","ا","ت","ن","م","ک","گ","ظ","ط","ز",
"ر","ذ","د","ئ","و","?","آ","ژ","پ","ء","،","ۀ","؛",
"ٌ","'ً","آ","ِ","ُ","َ","ة","ي","ؤ","إ","أ" };
for(int i=0;i<len;i++)
{
for(int j=0;j<49;j++)
{
if(message.contains(chr[j]));
{
EnglishSms="false";
Toast.makeText(getApplicationContext(), chr[j], Toast.LENGTH_LONG).show();
// break;
}
}
}
なぜ2つのforループがありますか?長さは何ですか?あなたの質問 –
を詳しく説明してください。これは、 "for(int j = 0; j <49; for(int i = 0; i