/usr/share/ada/adainclude/texttools/strings.ads is in libtexttools3-dev 2.0.7-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | ------------------------------------------------------------------------------
-- STRINGS --
-- --
-- Part of TextTools --
-- Designed and Programmed by Ken O. Burtch --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright (C) 1999-2007 Ken O. Burtch --
-- --
-- This is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. This is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with this; see file COPYING. If not, write --
-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
-- MA 02111-1307, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- This is maintained at http://www.pegasoft.ca/tt.html --
-- --
------------------------------------------------------------------------------
with common; use common;
pragma Elaborate( common ); -- remind Ada the common elaborates first
package strings is
---> Misc Functions
--
-- FixSpacing - remove leading/trailing spaces, etc.
-- HashOf - compute a random value from the string
-- PhoneticsOf - compute English phonetics of the string
-- TypoOf - true if first string is a typo of the second
-- Tokenize - represent the position of the string in a list as an
-- encoded character, or ' ' if not in list or list too long
-- Untokenize - return the string represented by the encoded character
-- FGREP - search for a string is a list of text
-- SED - search for a string in a list of text and operate on it
-- AWK - UNIX awk on a list of text
procedure FixSpacing( s : in out str255 );
function HashOf( hashstr : str255 ) return long_integer;
function PhoneticsOf( s : str255 ) return str255;
function TypoOf( BadString, GoodString : Str255 ) return boolean;
procedure Tokenize( s : str255; words : in out Str255List.List;
ch : in out character );
procedure Untokenize( ch : character ; words : in out Str255List.List;
s : in out str255 );
function ToUpper( s : str255 ) return str255;
function ToLower( s : str255 ) return str255;
function FGREP( s : str255; text : str255; filter_out : boolean := false;
case_insensitive : boolean := false ) return boolean;
function FGREP( s : str255; text : str255; filter_out : boolean := false;
case_insensitive : boolean := false ) return str255;
procedure FGREP( s : str255; text : in out Str255List.List;
filter_out : boolean := false; case_insensitive : boolean := false );
procedure FGREP( s : str255; text : in out Str255List.List;
result : out boolean; filter_out : boolean := false;
case_insensitive : boolean := false );
-- procedure SED( sedexpr : str255; text : in out Str255List.List );
-- procedure AWK( awkexpr, text : in out Str255List.List );
---> ASCII Encoding/Decoding
--
-- Compresses and appends a basic data item to the given string
subtype EncodedString is str255;
procedure Encode( estr : in out EncodedString; b : in boolean );
procedure Encode( estr : in out EncodedString; c : in character );
procedure Encode( estr : in out EncodedString; i : in integer );
procedure Encode( estr : in out EncodedString; l : in Long_Integer );
procedure Encode( estr : in out EncodedString; r : in ARect );
procedure Encode( estr : in out EncodedString; s : in str255 );
procedure Decode( estr : in out EncodedString; b : out boolean );
procedure Decode( estr : in out EncodedString; c : out character );
procedure Decode( estr : in out EncodedString; i : out integer );
procedure Decode( estr : in out EncodedString; l : out Long_Integer );
procedure Decode( estr : in out EncodedString; r : out ARect );
procedure Decode( estr : in out EncodedString; s : out str255 );
type packed_string is new string;
-- BASIC PACK
--
-- Compress string s using dipthong compression resulting in a new string of
-- 50% to 100% the size of the original. s must contain only lower ASCII
-- characters since the upper ASCII characters are used for the compression.
------------------------------------------------------------------------------
function basic_pack( s : string ) return packed_string;
-- UNPACK
--
-- Decompress string s that was compressed using basic_pack.
------------------------------------------------------------------------------
function unpack( s : packed_string ) return string;
end strings;
|