Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

mstring.cc File Reference

More...

#include <ctype.h>
#include <stdio.h>
#include <stdarg.h>
#include "magic/mobject.h"
#include "magic/mstring.h"
#include "magic/mclass.h"
#include "magic/mregexp.h"
#include "magic/mstream.h"
#include "magic/mtextstream.h"
#include "magic/mdatastream.h"
#include "magic/mexception.h"

Go to the source code of this file.

Functions

 BEGIN_NAMESPACE (MagiC)
bool findLowestNum (const String &str, uint &start, uint &end)
char * safedup (const char *orig, int maxlen)


Detailed Description

Definition in file mstring.cc.


Function Documentation

BEGIN_NAMESPACE MagiC   
 

This file is part of the MagiC++ library.

* * Copyright (C) 1998-2002 Marko Grönroos <magi@iki.fi> * *

* This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; see the file COPYING.LIB. If * not, write to the Free Software Foundation, Inc., 59 Temple Place *

  • Suite 330, Boston, MA 02111-1307, USA. * *

bool findLowestNum const String   str,
uint &    start,
uint &    end
 

Returns true if value found.

TODO: Make String private.

Definition at line 517 of file mstring.cc.

References String::length().

char* safedup const char *    orig,
int    maxlen
 

Duplicates a null-terminated C-style string.

Safer version of strdup - checks if the string is NULL.

Also, uses new to allocate the string.

Returns:
Pointer to the newly allocated copy.

Definition at line 1221 of file mstring.cc.


Generated on Thu Feb 10 20:06:43 2005 for LibMagiC by doxygen1.2.18