vb@rchiv
VB Classic
VB.NET
ADO.NET
VBA
C#
Zippen wie die Profis!  
 vb@rchiv Quick-Search: Suche startenErweiterte Suche starten   Impressum  | Datenschutz  | vb@rchiv CD Vol.6  | Shop Copyright ©2000-2024
 
zurück

 Sie sind aktuell nicht angemeldet.Funktionen: Einloggen  |  Neu registrieren  |  Suchen

VB.NET - Ein- und Umsteiger
.contains vs instr() und .replace vs replace() und ReplacePlus() 
Autor: Jojo
Datum: 15.07.09 13:05

Moin Jungs,

so, jetzt mal Butter bei die Fische ...

Wie macht man es richtig?

suchen nach den vorhanden sein eines Strings in einem anderen:

if instr(1,String1,String2,vbtextcompare) then 'vb6
 
if String1.contains(String2) then 'vb.net
Ich habe gelesen, dass Instr nicht mehr verwendet werden soll. Dann habe ich gelesen, dass Contains nicht schnell genug wäre. Und dann habe ich es nicht hinbekommen .contains klar zu machen dass ich nicht casesensitive suchen will.

Bitte gebt mal euer Meinung dazu ab ...

Gleiches bei Replace:

die alte Funtion Replace() erlaubt den Parameter vbtextcompare und damit den nicht casesensitiven Vergleich ...

Replace(String1,String2,,vbtextcompare) 'VB6
 
String1.replace(String2) 'vb.net
Hier im VBarchiv findet sich zusätzlich noch die Funktion ReplacePlus() http://www.vbarchiv.net/tipps/details.php?id=1397

Die .replace() habe ich auch noch nicht dazu gebracht groß-Kleinschreibung zu ignorieren

Wie macht ihr das?

Joachim

Joachim

alle Nachrichten anzeigenGesamtübersicht  |  Zum Thema  |  Suchen

 ThemaViews  AutorDatum
.contains vs instr() und .replace vs replace() und ReplacePl...5.998Jojo15.07.09 13:05
Re: .contains vs instr() und .replace vs replace() und Repla...4.074Maas15.07.09 13:19
Re: .contains vs instr() und .replace vs replace() und Repla...4.097Jojo15.07.09 13:22
Re: .contains vs instr() und .replace vs replace() und Repla...3.998xy_keineahnung15.07.09 13:28
Re: .contains vs instr() und .replace vs replace() und Repla...4.014ModeratorFZelle15.07.09 14:09
Re: .contains vs instr() und .replace vs replace() und Repla...4.001Jojo15.07.09 17:37
Re: .contains vs instr() und .replace vs replace() und Repla...3.948ModeratorFZelle15.07.09 19:19
Re: .contains vs instr() und .replace vs replace() und Repla...3.921Jojo16.07.09 08:25
Re: .contains vs instr() und .replace vs replace() und Repla...3.945ModeratorFZelle16.07.09 10:00
Re: .contains vs instr() und .replace vs replace() und Repla...3.945Jojo16.07.09 11:30
Re: .contains vs instr() und .replace vs replace() und Repla...3.944ModeratorFZelle16.07.09 12:07
Re: .contains vs instr() und .replace vs replace() und Repla...4.035Jojo16.07.09 12:34
Re: .contains vs instr() und .replace vs replace() und Repla...3.934ModeratorFZelle16.07.09 15:18
Re: .contains vs instr() und .replace vs replace() und Repla...3.995Jojo16.07.09 15:29
Re: .contains vs instr() und .replace vs replace() und Repla...3.957sollniss17.07.09 17:26
Re: .contains vs instr() und .replace vs replace() und Repla...3.987Jojo18.07.09 09:44
Re: .contains vs instr() und .replace vs replace() und Repla...3.988keco18.07.09 10:53
Re: .contains vs instr() und .replace vs replace() und Repla...3.887Snoopy18.07.09 12:35
Re: .contains vs instr() und .replace vs replace() und Repla...3.891keco18.07.09 12:41
Re: .contains vs instr() und .replace vs replace() und Repla...4.150Snoopy18.07.09 12:29
Re: .contains vs instr() und .replace vs replace() und Repla...3.868ModeratorDaveS18.07.09 12:40
Re: .contains vs instr() und .replace vs replace() und Repla...3.968Jojo19.07.09 08:55
Re: .contains vs instr() und .replace vs replace() und Repla...3.939ModeratorDaveS19.07.09 16:17

Sie sind nicht angemeldet!
Um auf diesen Beitrag zu antworten oder neue Beiträge schreiben zu können, müssen Sie sich zunächst anmelden.

Einloggen  |  Neu registrieren

Funktionen:  Zum Thema  |  GesamtübersichtSuchen 

nach obenzurück
 
   

Copyright ©2000-2024 vb@rchiv Dieter Otter
Alle Rechte vorbehalten.
Microsoft, Windows und Visual Basic sind entweder eingetragene Marken oder Marken der Microsoft Corporation in den USA und/oder anderen Ländern. Weitere auf dieser Homepage aufgeführten Produkt- und Firmennamen können geschützte Marken ihrer jeweiligen Inhaber sein.

Diese Seiten wurden optimiert für eine Bildschirmauflösung von mind. 1280x1024 Pixel