The outage for Sunday 24th November has been cancelled.
Bioplib
Protein Structure C Library
 All Data Structures Files Functions Variables Typedefs Macros Pages
Macros | Functions
stringutil.c File Reference

String utilities. More...

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "pdb.h"
#include "macros.h"

Go to the source code of this file.

Macros

#define MAXWORD   8
 

Functions

char * blCollapseSpaces (char *inText)
 
char * blStrdup (char *instr)
 

Detailed Description

String utilities.

Version
V1.0
Date
28.04.15
Author
Dr. Andrew C. R. Martin
Institute of Structural & Molecular Biology, University College London, Gower Street, London. WC1E 6BT.
andre.nosp@m.w@bi.nosp@m.oinf..nosp@m.org..nosp@m.uk andre.nosp@m.w.ma.nosp@m.rtin@.nosp@m.ucl..nosp@m.ac.uk

This code is NOT IN THE PUBLIC DOMAIN, but it may be copied according to the conditions laid out in the accompanying file COPYING.DOC.

The code may be modified as required, but any modifications must be documented so that the person responsible can be identified.

The code may not be sold commercially or included as part of a commercial product except as described in the file COPYING.DOC.

Description:

Usage:

See documentation for details

Revision History:

Definition in file stringutil.c.

Macro Definition Documentation

#define MAXWORD   8

Definition at line 83 of file stringutil.c.

Function Documentation

char* blCollapseSpaces ( char *  inText)
Parameters
[in]*inTextInput text string
Returns
malloc()'d string with multiple spaces collapsed

Takes a string and collapses multiple spaces down to a single space Equivalent of perl 's/+/ /g' The input string is unmodified and malloc()s the output.

28.04.15 Original By: ACRM

Definition at line 108 of file stringutil.c.

char* blStrdup ( char *  instr)
Parameters
[in]instrA string
Returns
A malloc'd copy of the string

An implementation of SVr4, 4.3BSD, POSIX.1-2001 strdup() which is not standard ANSI C

  • 12.05.15 Original By: ACRM

Definition at line 157 of file stringutil.c.