Changeset 493 for trunk/SRC/Textoidl
- Timestamp:
- 04/08/14 11:28:29 (10 years ago)
- Location:
- trunk/SRC/Textoidl
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Textoidl/matchdelim.pro
r325 r493 49 49 ; Copyright (C) 1996 The Regents of the University of California, All 50 50 ; Rights Reserved. Written by Matthew W. Craig. 51 ; See the file COPYRIGHT for restrictions on distr ubting this code.51 ; See the file COPYRIGHT for restrictions on distributing this code. 52 52 ; This code comes with absolutely NO warranty; see DISCLAIMER for details. 53 53 ; -
trunk/SRC/Textoidl/nexttok.pro
r134 r493 4 4 ; NEXTTOK 5 5 ; PURPOSE: 6 ; Find the next occur ance of any of a set of characters in a6 ; Find the next occurrence of any of a set of characters in a 7 7 ; string and return the character which occurs next. 8 8 ; CATEGORY: … … 36 36 ; 37 37 ; Revision 1.2 1996/05/09 00:22:17 mcraig 38 ; Generalized so that the next occur ence of any of a set of characters will39 ; be returned.38 ; Generalized so that the next occurrence of any of a set of characters 39 ; will be returned. 40 40 ; 41 41 ; Revision 1.1 1996/01/31 18:41:06 mcraig … … 48 48 ; Copyright (C) 1996 The Regents of the University of California, All 49 49 ; Rights Reserved. Written by Matthew W. Craig. 50 ; See the file COPYRIGHT for restrictions on distr ubting this code.50 ; See the file COPYRIGHT for restrictions on distributing this code. 51 51 ; This code comes with absolutely NO warranty; see DISCLAIMER for details. 52 52 ;- … … 64 64 IF (n_params() NE 2) OR keyword_set(Help) THEN BEGIN 65 65 offset = ' ' 66 print, offset+'Find the next occur ance of any of a set of characters in a'66 print, offset+'Find the next occurrence of any of a set of characters in a' 67 67 print, offset+'string and return the character which occurs next.' 68 68 ; CALLING SEQUENCE: -
trunk/SRC/Textoidl/showtex.pro
r325 r493 44 44 ; Copyright (C) 1996 The Regents of the University of California, All 45 45 ; Rights Reserved. Written by Matthew W. Craig. 46 ; See the file COPYRIGHT for restrictions on distr ubting this code.46 ; See the file COPYRIGHT for restrictions on distributing this code. 47 47 ; This code comes with absolutely NO warranty; see DISCLAIMER for details. 48 48 ;- -
trunk/SRC/Textoidl/str_token.pro
r163 r493 57 57 ; Copyright (C) 1996 The Regents of the University of California, All 58 58 ; Rights Reserved. Written by Matthew W. Craig. 59 ; See the file COPYRIGHT for restrictions on distr ubting this code.59 ; See the file COPYRIGHT for restrictions on distributing this code. 60 60 ; This code comes with absolutely NO warranty; see DISCLAIMER for details. 61 61 ;- -
trunk/SRC/Textoidl/strcnt.pro
r325 r493 7 7 ; 8 8 ; @param STRN {in}{required}{type=string} 9 ; The string in which to count occur ences.9 ; The string in which to count occurrences. 10 10 ; 11 11 ; @param SUBSTRN {in}{required}{type=string} … … 20 20 ; 21 21 ; @returns 22 ; Number of occur ances of substring in string.22 ; Number of occurrences of substring in string. 23 23 ; 24 24 ; @restrictions 25 ; Overlapping occur ances are not counted separately. For26 ; example, counting occur ances of 'bb' in 'blah bbb' returns one27 ; occur ance.25 ; Overlapping occurrences are not counted separately. For 26 ; example, counting occurrences of 'bb' in 'blah bbb' returns one 27 ; occurrence. 28 28 ; 29 29 ; @history … … 33 33 ; 34 34 ; Revision 1.2 1996/05/09 00:22:17 mcraig 35 ; Added fast processing using BYTE arrays if we are counting occur ences of36 ; a single character. Added error handling.35 ; Added fast processing using BYTE arrays if we are counting occurrences 36 ; of a single character. Added error handling. 37 37 ; 38 38 ; Revision 1.1 1996/01/31 18:47:37 mcraig … … 41 41 ; Copyright (C) 1996 The Regents of the University of California, All 42 42 ; Rights Reserved. Written by Matthew W. Craig. 43 ; See the file COPYRIGHT for restrictions on distr ubting this code.43 ; See the file COPYRIGHT for restrictions on distributing this code. 44 44 ; This code comes with absolutely NO warranty; see DISCLAIMER for details. 45 45 ; … … 62 62 print, offset+'num = strcnt(strn, substring, [pos])' 63 63 print, offset+'Inputs:' 64 print,offset+offset+'string -- The string in which to count occur ences. in'64 print,offset+offset+'string -- The string in which to count occurrences. in' 65 65 print,offset+offset+'substring -- The substring to count occurrences of. in' 66 66 print,offset+offset+'pos -- the position at which to begin the search. [in]' … … 70 70 print,offset+offset+'/HELP -- Print useful message and return.' 71 71 print, offset+'Outputs:' 72 print,offset+offset+'num -- Number of occur ances of substring in string. out'72 print,offset+offset+'num -- Number of occurrences of substring in string. out' 73 73 return, -1 74 74 ENDIF … … 78 78 ; return if we weren't really given a substring to search for. . . 79 79 IF strlen(substrn) EQ 0 THEN BEGIN 80 print, "Error: Can't count occur ances of null string."80 print, "Error: Can't count occurrences of null string." 81 81 return, -1 82 82 ENDIF … … 86 86 IF strlen(tmpstrn) EQ 0 THEN return, 0 87 87 88 ; If looking for occur ences of single character, process using BYTE88 ; If looking for occurrences of single character, process using BYTE 89 89 ; array. 90 90 IF strlen(substrn) EQ 1 THEN BEGIN -
trunk/SRC/Textoidl/strtrans.pro
r325 r493 4 4 ; STRTRANS 5 5 ; PURPOSE: 6 ; Translate all occur ences of one substring to another.6 ; Translate all occurrences of one substring to another. 7 7 ; CATEGORY: 8 8 ; text/strings … … 42 42 ; 43 43 ; Revision 1.6 2004/01/11 01:49:00 mcraig 44 ; Changed format of one array to newer [] style to avoid fconflict with function name in astro library.44 ; Changed format of one array to newer [] style to avoid conflict with function name in astro library. 45 45 ; 46 46 ; Revision 1.5 2001/11/23 21:14:35 mcraig … … 68 68 ; Copyright (C) 1996 The Regents of the University of California, All 69 69 ; Rights Reserved. Written by Matthew W. Craig. 70 ; See the file COPYRIGHT for restrictions on distr ubting this code.70 ; See the file COPYRIGHT for restrictions on distributing this code. 71 71 ; This code comes with absolutely NO warranty; see DISCLAIMER for details. 72 72 ;- … … 84 84 IF (n_params() LT 3) OR keyword_set(help) THEN BEGIN 85 85 offset = ' ' 86 print, offset+'Translate all occur ences of one substring to another.'86 print, offset+'Translate all occurrences of one substring to another.' 87 87 print, offset+'new = strtrans(oldstr,from,to,ned)' 88 88 print, offset+'Inputs:' … … 127 127 128 128 ; Say strn='a#b#c', from='#' and to='@'. Then the approach here is to 129 ; first split strn at all occur ances of '#', then recombine the pieces129 ; first split strn at all occurrences of '#', then recombine the pieces 130 130 ; with '@' inserted instead. Do this for all elements of strn, and 131 131 ; all elements of from. -
trunk/SRC/Textoidl/textable.pro
r325 r493 54 54 ; Copyright (C) 1996 The Regents of the University of California, All 55 55 ; Rights Reserved. Written by Matthew W. Craig. 56 ; See the file COPYRIGHT for restrictions on distr ubting this code.56 ; See the file COPYRIGHT for restrictions on distributing this code. 57 57 ; This code comes with absolutely NO warranty; see DISCLAIMER for details. 58 58 ; -
trunk/SRC/Textoidl/textoidl.pro
r372 r493 45 45 ; 46 46 ; Revision 1.6 2004/01/11 01:49:00 mcraig 47 ; Changed format of one array to newer [] style to avoid fconflict with function name in astro library.47 ; Changed format of one array to newer [] style to avoid conflict with function name in astro library. 48 48 ; 49 49 ; Revision 1.5 2001/11/23 21:10:55 mcraig … … 64 64 ; Copyright (C) 1996 The Regents of the University of California, All 65 65 ; Rights Reserved. Written by Matthew W. Craig. 66 ; See the file COPYRIGHT for restrictions on distr ubting this code.66 ; See the file COPYRIGHT for restrictions on distributing this code. 67 67 ; This code comes with absolutely NO warranty; see DISCLAIMER for details. 68 68 ; -
trunk/SRC/Textoidl/translate_sub_super.pro
r327 r493 59 59 ; Copyright (C) 1996 The Regents of the University of California, All 60 60 ; Rights Reserved. Written by Matthew W. Craig. 61 ; See the file COPYRIGHT for restrictions on distr ubting this code.61 ; See the file COPYRIGHT for restrictions on distributing this code. 62 62 ; This code comes with absolutely NO warranty; see DISCLAIMER for details. 63 63 ; … … 163 163 ; Copyright (C) 1996 The Regents of the University of California, All 164 164 ; Rights Reserved. Written by Matthew W. Craig. 165 ; See the file COPYRIGHT for restrictions on distr ubting this code.165 ; See the file COPYRIGHT for restrictions on distributing this code. 166 166 ; This code comes with absolutely NO warranty; see DISCLAIMER for details. 167 167 ;-
Note: See TracChangeset
for help on using the changeset viewer.