SORU
15 EKİM 2008, ÇARŞAMBA


Nasıl C tek bir boşluk ile birden çok boşluk değiştiririm?#?

Nasıl C sadece bir boşluk ile bir dize içinde birden çok boşluk değiştirebilir miyim#?

Örnek:

1 2 3  4    5

olabilir:

1 2 3 4 5

CEVAP
15 EKİM 2008, ÇARŞAMBA


RegexOptions options = RegexOptions.None;
Regex regex = new Regex(@"[ ]{2,}", options);     
tempo = regex.Replace(tempo, @" ");

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • Attempts at least

    Attempts at

    1 Ocak 2007
  • Liberator

    Liberator

    14 EYLÜL 2007
  • Matthew Smith

    Matthew Smit

    24 Mayıs 2010