suggestions provoke vb.net url shortener?


here duty (updated):



public common duty shortenurl(byval url string) string
relapse shortenurl(url, 32)
end function
public common duty shortenurl(byval url string, byval maxlength integer) string
url.length > maxlength then
string.format("{0}...{1}", url.substring(0, (maxlength / 2)), url.substring(url.length - ((maxlength / 2) - 3)))
else
relapse url
finish if
end function


i bound problem where didn't relapse maxlength chars since didn't take comment ellipses.






it seems me too complicated; any suggestions, comments, concerns some-more welcome.



Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

using mvc, should hoop communication between views? between models?