PDA

View Full Version : String.find String.left slow, why?


brianlesker
10-05-2004, 04:34 AM
Can somebody tell me why the following code is VERY slow while running:
Maybe there is a better why to code it.

strThinClientReal1 is a variabele path. The code is to extract d:\DIR from strThinClientReal1 .


strThinClientReal1 = "d:\\oracle6i\\forms60\\server";

strThinClientPathSearch = String.Find(strThinClientReal1, "\\", 4, true);
strOracle6iPath = String.Left(strThinClientReal1, strThinClientPathSearch);
strOracle6iPathStripped = String.TrimRight(strOracle6iPath, "\\");

brianlesker
10-05-2004, 05:02 AM
Sorry, it's not slow it was something else....but maybe the code can be better, some suggestions?