2 /**************************************************************************
3 ** (c) Copyright 2003, Andromeda Technology & Automation
4 ** This is free software; you can redistribute it and/or modify it under the
5 ** terms of the GNU General Public License, see the file COPYING.
6 ***************************************************************************
7 ** MODULE INFORMATION *
8 ***********************
9 ** FILE NAME : string_utils.cpp
10 ** SYSTEM NAME : Gnucomo - Gnu Computer Monitoring
11 ** VERSION NUMBER : $Revision: 1.1 $
13 ** DESCRIPTION : Utility functions for Strings
18 ***************************************************************************
19 ** ADMINISTRATIVE INFORMATION *
20 ********************************
21 ** ORIGINAL AUTHOR : Arjen Baart - arjen@andromeda.nl
22 ** CREATION DATE : Jul 31, 2003
23 ** LAST UPDATE : Jul 31, 2003
25 **************************************************************************/
27 /*****************************
28 $Log: string_utils.cpp,v $
29 Revision 1.1 2003-08-05 08:15:01 arjen
30 Debug output to the log stream instead of cerr.
31 Fixed namespace problems in XPath searches of the DOM.
32 Moved string utility functions to a separate file.
34 *****************************/
36 static const char *RCSID = "$Id: string_utils.cpp,v 1.1 2003-08-05 08:15:01 arjen Exp $";
38 #include <AXE/String.h>
40 /*=========================================================================
42 ** SYNOPSIS : String SQL_Escape(String)
46 ** DESCRIPTION : Insert backslashes before single quotes.
53 **=========================================================================
56 String SQL_Escape(String s)
60 for (i = 0; i < ~s; i++)
72 /*=========================================================================
73 ** NAME : XML_Entities
74 ** SYNOPSIS : String XML_Entities(String)
78 ** DESCRIPTION : Replace special characters for XML with their entity codes:
88 **=========================================================================
91 String XML_Entities(String s)
95 for (i = 0; i < ~s; i++)