1
-------------------------------------------------------------------------------
3
-- This file is part of AdaBrowse.
5
-- <STRONG>Copyright (c) 2002 by Thomas Wolf.</STRONG>
7
-- AdaBrowse is free software; you can redistribute it and/or modify it
8
-- under the terms of the GNU General Public License as published by the
9
-- Free Software Foundation; either version 2, or (at your option) any
10
-- later version. AdaBrowse is distributed in the hope that it will be
11
-- useful, but <EM>without any warranty</EM>; without even the implied
12
-- warranty of <EM>merchantability or fitness for a particular purpose.</EM>
13
-- See the GNU General Public License for more details. You should have
14
-- received a copy of the GNU General Public License with this distribution,
15
-- see file "<A HREF="GPL.txt">GPL.txt</A>". If not, write to the Free
16
-- Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
21
-- Author:</STRONG><DD>
23
-- <ADDRESS><A HREF="mailto:twolf@acm.org">twolf@acm.org</A></ADDRESS></DL>
26
-- Purpose:</STRONG><DD>
27
-- Miscellaneous text utilities.</DL>
32
-- 02-FEB-2002 TW First release.
33
-- 07-FEB-2002 TW Added 'Quote'.
34
-- 06-JUN-2003 TW Added 'To_Lower' and 'To_Upper'.
35
-- 11-JUN-2003 TW Added 'Canonical'.
36
-- 22-JUL-2003 TW Removed 'To_Lower' and 'To_Upper'.
38
-------------------------------------------------------------------------------
42
with Ada.Characters.Handling;
44
package AD.Text_Utilities is
46
pragma Elaborate_Body;
50
Substitute : in Character := ' ')
52
renames Ada.Characters.Handling.To_String;
54
function To_Wide_String
57
renames Ada.Characters.Handling.To_Wide_String;
60
(Suspicious_Name : in String)
62
-- Canonicalized the file name to make sure that all \ or / are replaced
63
-- by the current directory separator.
66
(Unit_Name : in String;
67
Suffix : in String := "ads")
69
-- Replaces all '.' in Unit_Name by '-', maps the whole thing to lower
70
-- case, appends '.' & Suffix, and returns the resulting string.
75
-- If 'S' does not contain white space nor single or double quotes,
76
-- returns 'S'. Otherwise, encloses 'S' in double quotes and inserts
77
-- a backslash ('\') before any double quote within 'S'.
79
end AD.Text_Utilities;