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

  • ChannelRichard

    ChannelRicha

    7 Kasım 2008
  • Jonathan Flavell

    Jonathan Fla

    1 HAZİRAN 2006
  • LIVESTRONG.COM

    LIVESTRONG.C

    5 EKİM 2005