Monday, 15 April 2013

vb.net - Getting one word from given string -



vb.net - Getting one word from given string -

i have next strings: anaheim temp. 1-n/a , cevera-n/a.

how temp first 1 , cevera sec one?

so sorry,i'll seek provide more info: lets want split first string first name , lastly name first name "anaheim" lastly name "temp" sec example: "alex orellana-na" first name "alex" lastly name "orellana" how rid of whats coming after special characters "-" "." "/"

i think understand asking for. looking function take 2 strings , search 1 string phrase, homecoming result if contains it. believe have solution issue:

public function findcertainstring(stringtosearch string, stringtofind string) string index = 1 stringtosearch.length - 1 dim character char = stringtosearch(index) ' parse through whole string , find match values if character = stringtofind(0) ' matched first letter dim tempindex integer = index dim someword string = "" innerindex = 1 stringtofind.length someword += stringtosearch(tempindex) tempindex += 1 next if someword = stringtofind ' found word looking homecoming someword end if end if next homecoming "" end function

this should satisfy looking because function take in 2 strings stringtosearch prase through each character until identifies match origin letter in stringtofind there collects equal length in characters , examines if matches stringtofind value.

vb.net string substring

No comments:

Post a Comment