| To: | Getting Started <gettingstarted at lists dot realsoftware dot com> |
|---|---|
| Subject: | Re: last occurrence of a character. |
| From: | Ian Mann <ian at ianmann dot demon dot co dot uk> |
| Date: | Tue, 31 Aug 2004 18:16:18 +0100 |
| Delivered-to: | gettingstarted at lists dot realsoftware dot com |
On Tuesday, August 31, 2004, at 05:24 pm, Stephen Goodson wrote: How do I get the _last_ occurrence of a character in a string.
This is a bit kluge too but..
Protected Function LastInStr(a as string, key as string) As Integer
dim result,start,pos as integer
start = 1
do
result = pos
pos = a.instr(start,key)
start = pos + 1
loop until pos = 0
return result
End Function
Regards
Ian
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Serial Port Problems, Joseph J. Strout |
|---|---|
| Next by Date: | Re: Serial Port Problems, Barry Lumpkin |
| Previous by Thread: | Re: last occurrence of a character., Joseph J. Strout |
| Next by Thread: | how to set the size of an editfield to view all text ?, dazz |
| Indexes: | [Date] [Thread] [Top] [All Lists] |