/[james]/archive/wimplibs/String/1
ViewVC logotype

Annotation of /archive/wimplibs/String/1

Parent Directory Parent Directory | Revision Log Revision Log


Revision 32 - (hide annotations) (download)
Thu Sep 25 18:54:17 2003 UTC (21 years, 1 month ago) by james
File size: 775 byte(s)
Initial import.

1 james 32 REM > JLibraries:String.1
2    
3     DEF FNString_Lower(Text$)
4     LOCAL Resu$, Loop%, Char%
5     IF Text$ = "" THEN =""
6     Resu$ = ""
7     FOR Loop% = 1 TO LEN(Text$)
8     Char% = ASC(MID$(Text$, Loop%, 1))
9     IF Char% > 64 AND Char% < 91 THEN Char% += 32
10     Resu$ += CHR$(Char%)
11     NEXT
12     =Resu$
13    
14     REM ˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜
15    
16     DEF PROCString_Replace(RETURN Text$, Find$, Repl$)
17     LOCAL Find%
18     Find% = INSTR(Text$, Find$)
19     WHILE Find%
20     MID$(Text$, Find%) = Repl$
21     Find% = INSTR(Text$, Find$)
22     ENDWHILE
23     ENDPROC
24    
25     REM ˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜˜
26    
27     DEF FNString_Replace(Text$, Find$, Repl$)
28     LOCAL Find%
29     Find% = INSTR(Text$, Find$)
30     WHILE Find%
31     MID$(Text$, Find%) = Repl$
32     Find% = INSTR(Text$, Find$)
33     ENDWHILE
34     =Text$

  ViewVC Help
Powered by ViewVC 1.1.26