summaryrefslogtreecommitdiff
path: root/dviware/ln03/rose/lnfinc.pli
blob: c8cafe8ff661d8338bae9bc434ba26dae39b2e1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
cvis: PROCEDURE (i) RETURNS (CHAR (*));
    DCL i FIXED;		
 
    RETURN (frontstrip(CHAR (i)));
END cvis;

strip: PROCEDURE (t) RETURNS (CHAR (*));
    DCL i FIXED,		
	t CHAR (*);		
 
    DO i = Length (t) TO 1 BY -1;	
	IF substr (t,i,1) ^= ' '	
	THEN RETURN (substr (t,1,i));	
    END;
    RETURN ('');			
END strip;
 
frontstrip: PROCEDURE (t) RETURNS (CHAR (*));
    DCL i FIXED,			
	t CHAR (*);			
 
    DO i = 1 TO Length (t);		
	IF substr (t,i,1) ^= ' '	
	THEN RETURN (substr (t,i));	
    END;
    RETURN ('');			
END frontstrip;

upcase: PROCEDURE (text) RETURNS (CHAR (*));
    DCL text CHAR (*);

    RETURN (translate (text,
	    		'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
			'abcdefghijklmnopqrstuvwxyz'));
END upcase;