source: WorldVistAEHR/trunk/r/VICTORY_PROGRAMMING_ENVIRONMENT-ZVEM/ZVEMSLB.m@ 824

Last change on this file since 824 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 1.8 KB
Line 
1ZVEMSLB ;DJB,VSHL**VA KERNEL Library Functions - String [8/18/95 1:31pm]
2 ;;12;VPE;;COPYRIGHT David Bolduc @1993
3 ;
4STRING ;;;
5 ;;; STRING FUNCTIONS - XLFSTR
6 ;;;
7 ;;; UP(x)......Uppercase
8 ;;; Convert string in x to all uppercase letters
9 ;;; Ex: W $$UP^XLFSTR("freedom") --> "FREEDOM"
10 ;;;
11 ;;; LOW(x).....Lowercase
12 ;;; Comvert string in x to all lowercase letters
13 ;;; Ex: W $$LOW^XLFSTR("JUSTICE") --> "justice"
14 ;;;
15 ;;; STRIP(x,y).....Strip a string
16 ;;; Strip all instances of character y in string x
17 ;;; Ex: W $$STRIP^XLFSTR("hello","e") --> "hllo"
18 ;;;
19 ;;; REPEAT(x,y)....Repeat a string
20 ;;; Repeat the value of x for y number of times
21 ;;; Ex: W $$REPEAT^XLFSTR("-",10) --> "----------"
22 ;;;
23 ;;; INVERT(x)....Invert a string
24 ;;; Invert the order of characters in string x
25 ;;; Ex: W $$INVERT^XLFSTR("ABC") --> "CBA"
26 ;;;
27 ;;; REPLACE(in,.spec)....Replace strings
28 ;;; Replace specified strings
29 ;;; in input string
30 ;;; spec an array passed by reference
31 ;;; Ex: SET spec("aa")="a",spec("pqr")="alabama"
32 ;;; $$REPLACE^XLFSTR("aaaaaaapqraaaaaaa",.spec) --> "aaaaalabamaaaaa"
33 ;;; SET spec("F")="File",spec("M")="Man"
34 ;;; $$REPLACE^XLFSTR("FM",.spec) --> "FileMan"
35 ;;;
36 ;;; RJ(s,i,p)...Right Justify
37 ;;; LJ(s,i,p)...Left Justify
38 ;;; CJ(s,i,p)...Center Justify
39 ;;; Right,left,center Justify a character string
40 ;;; s = character string
41 ;;; i = field size
42 ;;; p = pad character(optional)
43 ;;; Ex: W "[",$$RJ^XLFSTR("SAM",10),"]" --> [ SAM]
44 ;;; W "[",$$RJ^XLFSTR("SAM",10,"-"),"]" --> [--------SAM]
45 ;;; W "[",$$LJ^XLFSTR("DON",10),"]" --> [DON ]
46 ;;; W "[",$$CJ^XLFSTR("SUE",10),"]" --> [ SUE ]
47 ;;;***
Note: See TracBrowser for help on using the repository browser.