Help with replace function
This seems so simple - I thought my understanding of the replace function was fairly good until today. Here is my problem simplified:
1..I have a string "3454.5". I would like to replace the last digit with an empty space,why can I not use the replace function like so: (for various reasons I would like to reach my solution the way I have tryed?)
<%
dim myString,tweaked
myString = "3454.5"
tweaked = replace(myString,"5","",(len(myString)-1),1)
response.write tweaked
%>
My objective is to get the string 3454.
Someone please correct me, My understanding of the replace function:
Replace(expression, find, replacewith[, start[, count[, compare]]])
Why is my start location ignoring my len(myString)-1)? Even if I hard code a number in there it still bahaves badly.
TYIA
Wind is your friend
Matt
__________________
Wind is your friend
Matt
|