for i = len(str) to 1 step -1
if mid(str,i,1)="/" then
debug.print i
end if
next for算法很简单,如果要追求效率,可以考虑其他算法随手写的,没有经过调试
if mid(str,i,1)="/" then
debug.print i
end if
next for算法很简单,如果要追求效率,可以考虑其他算法随手写的,没有经过调试
调试欢乐多
public function GetLeftStr(str as String) as integer
for i = len(str) to 1 step -1
if mid(str,i,1)="/" then
GetLeftStr=i
exit function
end if
next for
end function