Displaying 1 result from an estimated 1 matches for "previousurllength".
2010 Jul 12
1
Comparison of two very large strings
...n/star/2004/0610/fo4-1.html&ei=uUKwSe7XN9CCt
and so on for about 1 million records.
Here is the function that I am using to compare the two strings:-
stringCompare <- function(currentURL, currentId){
j <- currentId - 1
while(j>=1)
previousURL <- urlDataFrame[j,"url"]
previousURLLength <- nchar(previousURL)
#Compare smaller with bigger
if(nchar(currentURL) <= previousURLLength){
matchPhrase <- substr(previousURL,1,nchar(currentURL))
if(matchPhrase == currentURL){
return(TRUE)
}
}else{
matchPhrase <- substr(currentURL,1,previousURLLength)
if(matchPhrase == previous...