Annotation of freem/mlib/%STRING.m, revision 1.2
1.2 ! snw 1: %STRING(THIS,INIT) ;VCL/SNW-STRING TYPE DEFINITION; 03/09/25 06:23 PM
! 2: ;0.0;FreeM;****FREEM**;Serena Willis @2025
! 3: ;
! 4: ; $Id$
! 5: ; String type definition
! 6: ;
! 7: ;
! 8: ; Author: Serena Willis <snw@coherent-logic.com>
! 9: ; Copyright (C) 1998 MUG Deutschland
! 10: ; Copyright (C) 2023, 2025 Coherent Logic Development LLC
! 11: ;
! 12: ;
! 13: ; This file is part of FreeM.
! 14: ;
! 15: ; FreeM is free software: you can redistribute it and/or modify
! 16: ; it under the terms of the GNU Affero Public License as published by
! 17: ; the Free Software Foundation, either version 3 of the License, or
! 18: ; (at your option) any later version.
! 19: ;
! 20: ; FreeM is distributed in the hope that it will be useful,
! 21: ; but WITHOUT ANY WARRANTY; without even the implied warranty of
! 22: ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! 23: ; GNU Affero Public License for more details.
! 24: ;
! 25: ; You should have received a copy of the GNU Affero Public License
! 26: ; along with FreeM. If not, see <https://www.gnu.org/licenses/>.
! 27: ;
! 28: ; $Log$
! 29: ;
! 30: ; SPDX-FileCopyrightText: (C) 2025 Coherent Logic Development LLC
! 31: ; SPDX-License-Identifier: AGPL-3.0-or-later
1.1 snw 32: S THIS=$G(INIT,"")
33: QUIT
34: ASCII(THIS,POS) N RP S RP=$G(POS,1) Q $A(THIS,RP)
35: ascii(THIS,POS) N RP S RP=$G(POS,1) Q $A(THIS,RP)
36: Ascii(THIS,POS) N RP S RP=$G(POS,1) Q $A(THIS,RP)
37: DATA(THIS) Q $D(THIS)
38: data(THIS) Q $D(THIS)
39: Data(THIS) Q $D(THIS)
40: DISTANCE(THIS,COMP) Q $ZLSD(THIS,COMP)
41: distance(THIS,COMP) Q $ZLSD(THIS,COMP)
42: Distance(THIS,COMP) Q $ZLSD(THIS,COMP)
43: EXTRACT(THIS,START,END) Q $E(THIS,$G(START,1),$G(END,$G(START,1)))
44: extract(THIS,START,END) Q $E(THIS,$G(START,1),$G(END,$G(START,1)))
45: Extract(THIS,START,END) Q $E(THIS,$G(START,1),$G(END,$G(START,1)))
46: FIND(THIS,SUBSTR,START) N RS S RS=$GET(START,1) Q $F(THIS,SUBSTR,RS)
47: find(THIS,SUBSTR,START) N RS S RS=$GET(START,1) Q $F(THIS,SUBSTR,RS)
48: Find(THIS,SUBSTR,START) N RS S RS=$GET(START,1) Q $F(THIS,SUBSTR,RS)
49: FNUMBER(THIS,CODES) Q $FN(THIS,CODES)
50: fnumber(THIS,CODES) Q $FN(THIS,CODES)
51: Fnumber(THIS,CODES) Q $FN(THIS,CODES)
52: JUSTIFY(THIS,COUNT,DIG) Q $J(THIS,COUNT,$GET(DIG,$L(THIS)))
53: justify(THIS,COUNT,DIG) Q $J(THIS,COUNT,$GET(DIG,$L(THIS)))
54: Justify(THIS,COUNT,DIG) Q $J(THIS,COUNT,$GET(DIG,$L(THIS)))
55: LENGTH(THIS) Q $L(THIS)
56: length(THIS) Q $L(THIS)
57: Length(THIS) Q $L(THIS)
58: PIECECOUNT(THIS,DELIM) Q $L(THIS,DELIM)
59: pieceCount(THIS,DELIM) Q $L(THIS,DELIM)
60: PieceCount(THIS,DELIM) Q $L(THIS,DELIM)
61: PIECE(THIS,DELIM,FIRST,LAST) N RF S RF=$G(FIRST,1) N RL S RL=$G(LAST,RF) Q $P(THIS,DELIM,RF,RL)
62: piece(THIS,DELIM,FIRST,LAST) N RF S RF=$G(FIRST,1) N RL S RL=$G(LAST,RF) Q $P(THIS,DELIM,RF,RL)
63: Piece(THIS,DELIM,FIRST,LAST) N RF S RF=$G(FIRST,1) N RL S RL=$G(LAST,RF) Q $P(THIS,DELIM,RF,RL)
64: REPLACE(THIS,SEARCH,REPLACE) Q $ZREPLACE(THIS,SEARCH,REPLACE)
65: replace(THIS,SEARCH,REPLACE) Q $ZREPLACE(THIS,SEARCH,REPLACE)
66: Replace(THIS,SEARCH,REPLACE) Q $ZREPLACE(THIS,SEARCH,REPLACE)
67: REVERSE(THIS) Q $RE(THIS)
68: reverse(THIS) Q $RE(THIS)
69: Reverse(THIS) Q $RE(THIS)
70: TOLOWER(THIS) Q $TR(THIS,"ABCDEFGHIJKLMNOPQRSTUVWXYZ","abcdefghijklmnopqrstuvwxyz")
71: toLower(THIS) Q $TR(THIS,"ABCDEFGHIJKLMNOPQRSTUVWXYZ","abcdefghijklmnopqrstuvwxyz")
72: ToLower(THIS) Q $TR(THIS,"ABCDEFGHIJKLMNOPQRSTUVWXYZ","abcdefghijklmnopqrstuvwxyz")
73: TOUPPER(THIS) Q $TR(THIS,"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ")
74: toUpper(THIS) Q $TR(THIS,"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ")
75: ToUpper(THIS) Q $TR(THIS,"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ")
76: TRANSLATE(THIS,SEARCH,REPLACE) N RR S RR=$G(REPLACE,"") Q $TR(THIS,SEARCH,RR)
77: translate(THIS,SEARCH,REPLACE) N RR S RR=$G(REPLACE,"") Q $TR(THIS,SEARCH,RR)
78: Translate(THIS,SEARCH,REPLACE) N RR S RR=$G(REPLACE,"") Q $TR(THIS,SEARCH,RR)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>