ajstr.c

Datatypes:
char* C character string
AjPStr String
const AjPStr String constant
AjIStr String iterator
AjPStrTok String token parser


Datatype: char*

Function is for manipulating C-type (char*) strings and takes at least one char* argument.

Sections:
constructorsConstructors
destructorsDestructors
filtersGeneral use
formattingModifiers
comparisonGeneral use
comparison (sorting)General use
parsing functionsGeneral use


char*: constructors

Functions for constructing C-type (char*) strings, possibly with a starting string.

Functions:
ajCharNewCA text string constructor which allocates memory for a string and initialises it with the text string provided.
ajCharNewSA text string constructor which allocates memory for a string and initialises it with the string provided.
ajCharNewResA text string constructor which allocates memory for a string of the specified length and initialises the contents as an empty string.
ajCharNewResCA text string constructor which allocates memory for a string of the specified length and initialises it with the text string provided.
ajCharNewResSA text string constructor which allocates memory for a string of the specified length and initialises it with the string provided.
ajCharNewResLenCA text string constructor which allocates memory for a string of the specified length and initialises it with the text string provided.
ajCharNullReturns a pointer to an empty string


Function ajCharNewC

A text string constructor which allocates memory for a string and initialises it with the text string provided.

Prototype

char* ajCharNewC (
      const char* txt
);

TypeNameRead/WriteDescription
const char*txtInputInitial text, possibly shorter than the space allocated.
char* RETURNA new text string.

From EMBOSS 1.0.0


Function ajCharNewS

A text string constructor which allocates memory for a string and initialises it with the string provided.

Prototype

char* ajCharNewS (
      const AjPStr str
);

TypeNameRead/WriteDescription
const AjPStrstrInputString object as initial value and size for the text.
char* RETURNA new text string.

From EMBOSS 4.0.0


Function ajCharNewRes

A text string constructor which allocates memory for a string of the specified length and initialises the contents as an empty string.

Prototype

char* ajCharNewRes (
      size_t size
);

TypeNameRead/WriteDescription
size_tsizeInputLength of the Cstring, excluding the trailing NULL.
char* RETURNA new text string with no contents.

From EMBOSS 4.0.0


Function ajCharNewResC

A text string constructor which allocates memory for a string of the specified length and initialises it with the text string provided.

Prototype

char* ajCharNewResC (
      const char* txt,
      size_t size
);

TypeNameRead/WriteDescription
const char*txtInputString object as initial value and size for the text.
size_tsizeInputMaximum string length, as returned by strlen
char* RETURNA new text string.

From EMBOSS 4.0.0


Function ajCharNewResS

A text string constructor which allocates memory for a string of the specified length and initialises it with the string provided.

Prototype

char* ajCharNewResS (
      const AjPStr str,
      size_t size
);

TypeNameRead/WriteDescription
const AjPStrstrInputString object as initial value and size for the text.
size_tsizeInputMaximum string length, as returned by strlen
char* RETURNA new text string.

From EMBOSS 4.0.0


Function ajCharNewResLenC

A text string constructor which allocates memory for a string of the specified length and initialises it with the text string provided.

Prototype

char* ajCharNewResLenC (
      const char* txt,
      size_t size,
      size_t len
);

TypeNameRead/WriteDescription
const char*txtInputString object as initial value and size for the text.
size_tsizeInputMaximum string length, as returned by strlen
size_tlenInputLength of txt to save calculation time.
char* RETURNA new text string.

From EMBOSS 4.0.0


Function ajCharNull

Returns a pointer to an empty string

Prototype

char* ajCharNull (
      void
);

TypeNameRead/WriteDescription
char* RETURNEmpty string

From EMBOSS 6.0.0


char*: destructors

Functions for destruction of C-type (char*) strings.

Functions:
ajCharDelA text string destructor to free memory for a text string.


Function ajCharDel

A text string destructor to free memory for a text string.

Prototype

void ajCharDel (
      char** Ptxt
);

TypeNameRead/WriteDescription
char**PtxtDeleteText string to be deallocated.
void RETURN

From EMBOSS 4.0.0


char*: filters

Functions for creating filters from C-type (char*) strings).

Functions:
ajCharGetfilterReturns a filter array to test for any character in a string.
ajCharGetfilterCaseReturns a filter array to test for any character in a string. The filter is case-insensitive
ajCharGetfilterLowerReturns a filter array to test for any character in a string as lower case.
ajCharGetfilterUpperReturns a filter array to test for any character in a string as upper case.


Function ajCharGetfilter

Returns a filter array to test for any character in a string.

Prototype

char* ajCharGetfilter (
      const char* txt
);

TypeNameRead/WriteDescription
const char*txtInputCharacter set to test
char* RETURNFilter array set to 1 for each ascii value accepted zero for any character not in the set.

From EMBOSS 6.6.0


Function ajCharGetfilterCase

Returns a filter array to test for any character in a string. The filter is case-insensitive

Prototype

char* ajCharGetfilterCase (
      const char* txt
);

TypeNameRead/WriteDescription
const char*txtInputCharacter set to test
char* RETURNFilter array set to 1 for each ascii value accepted zero for any character not in the set.

From EMBOSS 6.6.0


Function ajCharGetfilterLower

Returns a filter array to test for any character in a string as lower case.

Prototype

char* ajCharGetfilterLower (
      const char* txt
);

TypeNameRead/WriteDescription
const char*txtInputCharacter set to test
char* RETURNFilter array set to 1 for each ascii value accepted zero for any character not in the set.

From EMBOSS 6.6.0


Function ajCharGetfilterUpper

Returns a filter array to test for any character in a string as upper case.

Prototype

char* ajCharGetfilterUpper (
      const char* txt
);

TypeNameRead/WriteDescription
const char*txtInputCharacter set to test
char* RETURNFilter array set to 1 for each ascii value accepted zero for any character not in the set.

From EMBOSS 6.6.0


char*: formatting

Functions for formatting C-type (char*) strings).

Functions:
ajCharFmtLowerConverts a text string to lower case.
ajCharFmtUpperConverts a text string to upper case.


Function ajCharFmtLower

Converts a text string to lower case.

Prototype

AjBool ajCharFmtLower (
      char* txt
);

TypeNameRead/WriteDescription
char*txtModifyText string
AjBool RETURNajTrue on success

From EMBOSS 4.0.0


Function ajCharFmtUpper

Converts a text string to upper case.

Prototype

AjBool ajCharFmtUpper (
      char* txt
);

TypeNameRead/WriteDescription
char*txtModifyText string
AjBool RETURNajTrue on success

From EMBOSS 4.0.0


char*: comparison

Functions for comparing C-type (char*) strings.

Functions:
ajCharMatchCSimple test for matching two text strings.
ajCharMatchCaseCSimple case-insensitive test for matching two text strings.
ajCharMatchWildCSimple case-sensitive test for matching two text strings using wildcard characters.
ajCharMatchWildSSimple case-sensitive test for matching a text string and a string using wildcard characters.
ajCharMatchWildCaseCSimple case-insensitive test for matching two text strings using wildcard characters.
ajCharMatchWildCaseSSimple case-insensitive test for matching a text string and a string using wildcard characters.
ajCharMatchWildNextCTest for matching the next 'word' in two text strings using wildcard characters.
ajCharMatchWildNextCaseCTest for matching the next 'word' in two text strings using wildcard characters, case-insensitive.
ajCharMatchWildWordCCase-sensitive test for matching a text string 'word' against any word in a test text string using wildcard characters.
ajCharMatchWildWordCaseCCase-insensitive test for matching a text string 'word' against any word in a text string using wildcard characters.
ajCharPrefixCTest for matching the start of a text string against a given prefix text string.
ajCharPrefixSTest for matching the start of a text string against a given prefix string.
ajCharPrefixCaseCCase-insensitive test for matching the start of a text string against a given prefix text string.
ajCharPrefixCaseSCase-insensitive test for matching start of a text string against a given prefix string,
ajCharSuffixCTest for matching the end of a text string against a given suffix text string.
ajCharSuffixSTest for matching the end of a text string against a given suffix string.
ajCharSuffixCaseCCase-insensitive test for matching the end of a text string against a given suffix text string.
ajCharSuffixCaseSCase-insensitive test for matching the end of a text string against a given suffix string.


Function ajCharMatchC

Simple test for matching two text strings.

Prototype

AjBool ajCharMatchC (
      const char* txt,
      const char* txt2
);

TypeNameRead/WriteDescription
const char*txtInputString
const char*txt2InputText
AjBool RETURNajTrue if text completely matches the start of String

From EMBOSS 4.0.0


Function ajCharMatchCaseC

Simple case-insensitive test for matching two text strings.

Prototype

AjBool ajCharMatchCaseC (
      const char* txt,
      const char* txt2
);

TypeNameRead/WriteDescription
const char*txtInputString
const char*txt2InputText
AjBool RETURNajTrue if two strings are exactly the same excluding case

From EMBOSS 4.0.0


Function ajCharMatchWildC

Simple case-sensitive test for matching two text strings using wildcard characters.

Prototype

AjBool ajCharMatchWildC (
      const char* txt,
      const char* txt2
);

TypeNameRead/WriteDescription
const char*txtInputString
const char*txt2InputText
AjBool RETURNajTrue if the strings match

From EMBOSS 4.0.0


Function ajCharMatchWildS

Simple case-sensitive test for matching a text string and a string using wildcard characters.

Prototype

AjBool ajCharMatchWildS (
      const char* txt,
      const AjPStr str
);

TypeNameRead/WriteDescription
const char*txtInputString
const AjPStrstrInputWildcard text
AjBool RETURNajTrue if the strings match

From EMBOSS 4.0.0


Function ajCharMatchWildCaseC

Simple case-insensitive test for matching two text strings using wildcard characters.

Prototype

AjBool ajCharMatchWildCaseC (
      const char* txt,
      const char* txt2
);

TypeNameRead/WriteDescription
const char*txtInputString
const char*txt2InputText
AjBool RETURNajTrue if the strings match

From EMBOSS 4.1.0


Function ajCharMatchWildCaseS

Simple case-insensitive test for matching a text string and a string using wildcard characters.

Prototype

AjBool ajCharMatchWildCaseS (
      const char* txt,
      const AjPStr str
);

TypeNameRead/WriteDescription
const char*txtInputString
const AjPStrstrInputWildcard text
AjBool RETURNajTrue if the strings match

From EMBOSS 4.1.0


Function ajCharMatchWildNextC

Test for matching the next 'word' in two text strings using wildcard characters.

Prototype

AjBool ajCharMatchWildNextC (
      const char* txt,
      const char* txt2
);

TypeNameRead/WriteDescription
const char*txtInputString
const char*txt2InputText
AjBool RETURNajTrue if found

From EMBOSS 4.0.0


Function ajCharMatchWildNextCaseC

Test for matching the next 'word' in two text strings using wildcard characters, case-insensitive.

Prototype

AjBool ajCharMatchWildNextCaseC (
      const char* txt,
      const char* txt2
);

TypeNameRead/WriteDescription
const char*txtInputString
const char*txt2InputText
AjBool RETURNajTrue if found

From EMBOSS 4.1.0


Function ajCharMatchWildWordC

Case-sensitive test for matching a text string 'word' against any word in a test text string using wildcard characters.

Prototype

AjBool ajCharMatchWildWordC (
      const char* txt,
      const char* txt2
);

TypeNameRead/WriteDescription
const char*txtInputString
const char*txt2InputWildcard word
AjBool RETURNajTrue if found

From EMBOSS 4.0.0


Function ajCharMatchWildWordCaseC

Case-insensitive test for matching a text string 'word' against any word in a text string using wildcard characters.

Prototype

AjBool ajCharMatchWildWordCaseC (
      const char* txt,
      const char* txt2
);

TypeNameRead/WriteDescription
const char*txtInputString
const char*txt2InputWildcard word
AjBool RETURNajTrue if found

From EMBOSS 4.1.0


Function ajCharPrefixC

Test for matching the start of a text string against a given prefix text string.

Prototype

AjBool ajCharPrefixC (
      const char* txt,
      const char* txt2
);

TypeNameRead/WriteDescription
const char*txtInputTest string as text
const char*txt2InputPrefix as text
AjBool RETURNajTrue if the string begins with the prefix

From EMBOSS 4.0.0


Function ajCharPrefixS

Test for matching the start of a text string against a given prefix string.

Prototype

AjBool ajCharPrefixS (
      const char* txt,
      const AjPStr str
);

TypeNameRead/WriteDescription
const char*txtInputTest string as text
const AjPStrstrInputPrefix as string
AjBool RETURNajTrue if the string begins with the prefix

From EMBOSS 4.0.0


Function ajCharPrefixCaseC

Case-insensitive test for matching the start of a text string against a given prefix text string.

Prototype

AjBool ajCharPrefixCaseC (
      const char* txt,
      const char* txt2
);

TypeNameRead/WriteDescription
const char*txtInputText
const char*txt2InputPrefix
AjBool RETURNajTrue if the string begins with the prefix

From EMBOSS 4.0.0


Function ajCharPrefixCaseS

Case-insensitive test for matching start of a text string against a given prefix string,

Prototype

AjBool ajCharPrefixCaseS (
      const char* txt,
      const AjPStr str
);

TypeNameRead/WriteDescription
const char*txtInputText
const AjPStrstrInputPrefix
AjBool RETURNajTrue if the string begins with the prefix

From EMBOSS 4.0.0


Function ajCharSuffixC

Test for matching the end of a text string against a given suffix text string.

Prototype

AjBool ajCharSuffixC (
      const char* txt,
      const char* txt2
);

TypeNameRead/WriteDescription
const char*txtInputString
const char*txt2InputSuffix as text
AjBool RETURNajTrue if the string ends with the suffix

From EMBOSS 4.0.0


Function ajCharSuffixS

Test for matching the end of a text string against a given suffix string.

Prototype

AjBool ajCharSuffixS (
      const char* txt,
      const AjPStr str
);

TypeNameRead/WriteDescription
const char*txtInputTest string as text
const AjPStrstrInputSuffix as string
AjBool RETURNajTrue if the string ends with the suffix

From EMBOSS 4.0.0


Function ajCharSuffixCaseC

Case-insensitive test for matching the end of a text string against a given suffix text string.

Prototype

AjBool ajCharSuffixCaseC (
      const char* txt,
      const char* txt2
);

TypeNameRead/WriteDescription
const char*txtInputString
const char*txt2InputSuffix as text
AjBool RETURNajTrue if the string ends with the suffix

From EMBOSS 4.0.0


Function ajCharSuffixCaseS

Case-insensitive test for matching the end of a text string against a given suffix string.

Prototype

AjBool ajCharSuffixCaseS (
      const char* txt,
      const AjPStr str
);

TypeNameRead/WriteDescription
const char*txtInputTest string as text
const AjPStrstrInputSuffix as string
AjBool RETURNajTrue if the string ends with the suffix

From EMBOSS 4.0.0


char*: comparison (sorting)

Functions for sorting strings (including C-type char* strings).

Functions:
ajCharCmpCaseFinds the sort order of two text strings.
ajCharCmpCaseLenFinds the sort order of substrings from the start of two text strings.
ajCharCmpWildFinds the sort-order (case insensitive) of two text strings using wildcard characters.
ajCharCmpWildCaseFinds the sort-order (case sensitive) of two text strings using wildcard characters.


Function ajCharCmpCase

Finds the sort order of two text strings.

Prototype

int ajCharCmpCase (
      const char* txt,
      const char* txt2
);

TypeNameRead/WriteDescription
const char*txtInputText string
const char*txt2InputText string
int RETURN-1 if first string should sort before second, +1 if the second string should sort first. 0 if they are identical in length and content.

From EMBOSS 4.0.0


Function ajCharCmpCaseLen

Finds the sort order of substrings from the start of two text strings.

Prototype

int ajCharCmpCaseLen (
      const char* txt,
      const char* txt2,
      size_t len
);

TypeNameRead/WriteDescription
const char*txtInputText string
const char*txt2InputText string
size_tlenInputlength
int RETURN-1 if first string should sort before second, +1 if the second string should sort first. 0 if they are identical in length and content.

From EMBOSS 4.0.0


Function ajCharCmpWild

Finds the sort-order (case insensitive) of two text strings using wildcard characters.

Prototype

int ajCharCmpWild (
      const char* txt,
      const char* txt2
);

TypeNameRead/WriteDescription
const char*txtInputString
const char*txt2InputText
int RETURN-1 if first string should sort before second, +1 if the second string should sort first. 0 if they are identical in length and content.

From EMBOSS 4.0.0


Function ajCharCmpWildCase

Finds the sort-order (case sensitive) of two text strings using wildcard characters.

Prototype

int ajCharCmpWildCase (
      const char* txt,
      const char* txt2
);

TypeNameRead/WriteDescription
const char*txtInputString
const char*txt2InputText
int RETURN-1 if first string should sort before second, +1 if the second string should sort first. 0 if they are identical in length and content.

From EMBOSS 4.1.0


char*: parsing functions

Simple token parsing of strings

Functions:
ajCharParseCSimple token parsing from text string using a specified set of delimiters.


Function ajCharParseC

Simple token parsing from text string using a specified set of delimiters.

Prototype

AjPStr ajCharParseC (
      const char* txt,
      const char* txtdelim
);

TypeNameRead/WriteDescription
const char*txtInputString to be parsed (first call) or NULL for follow-up calls using the same string, as for the C RTL function strtok which is eventually called.
const char*txtdelimInputDelimiter(s) to be used between tokens.
AjPStr RETURNToken

From EMBOSS 4.0.0


Datatype: AjPStr

Functions for manipulating AJAX (AjPStr) strings

Sections:
constructorsConstructors
destructorsDestructors
assignmentAssignments
combination functionsModifiers
cuttingModifiers
substitutionModifiers
queryGeneral use
filtersGeneral use
element retrievalGeneral use
modifiable string retrievalModifiers
element assignmentModifiers
string to datatype conversion functionsCasts
datatype to string conversion functionsDerievd values
formattingModifiers
comparisonGeneral use
comparison (sorting)General use
comparison (search) functionsGeneral use
parsing functionsGeneral use
debuggingMiscellaneous
exitMiscellaneous


AjPStr: constructors

Functions for constructing string objects, possibly with a starting string.

Functions:
ajStrNewDefault string constructor which allocates memory for a string.
ajStrNewCString constructor which allocates memory for a string and initialises it with the text string provided.
ajStrNewKString constructor which allocates memory for a string and initialises it with the single character provided.
ajStrNewSString constructor which allocates memory for a string and initialises it with the string provided.
ajStrNewRefString referencing function which returns a pointer to the string passed in and increases its reference count.
ajStrNewResString constructor which allocates memory for a string of an initial reserved size (including a possible null).
ajStrNewResCString constructor which allocates memory for a string of an initial reserved size (including a possible null) and initialises it with the text string provided.
ajStrNewResSString constructor which allocates memory for a string of an initial reserved size (including a possible null) and initialises it with the string provided.
ajStrNewResLenCString constructor which allocates memory for a string of a given length and of an initial reserved size (including a possible null) and initialises it with the text string provided.


Function ajStrNew

Default string constructor which allocates memory for a string.

Prototype

AjPStr ajStrNew (
      void
);

TypeNameRead/WriteDescription
AjPStr RETURNPointer to an empty string

From EMBOSS 1.0.0


Function ajStrNewC

String constructor which allocates memory for a string and initialises it with the text string provided.

Prototype

AjPStr ajStrNewC (
      const char* txt
);

TypeNameRead/WriteDescription
const char*txtInputNull-terminated character string to initialise the new string.
AjPStr RETURNPointer to a string containing the supplied text

From EMBOSS 1.0.0


Function ajStrNewK

String constructor which allocates memory for a string and initialises it with the single character provided.

Prototype

AjPStr ajStrNewK (
      char ch
);

TypeNameRead/WriteDescription
charchInputNull-terminated character string to initialise the new string.
AjPStr RETURNPointer to a string containing the supplied text

From EMBOSS 6.2.0


Function ajStrNewS

String constructor which allocates memory for a string and initialises it with the string provided.

Prototype

AjPStr ajStrNewS (
      const AjPStr str
);

TypeNameRead/WriteDescription
const AjPStrstrInputString to be cloned
AjPStr RETURNPointer to a string of the specified size containing the supplied text.

From EMBOSS 1.0.0


Function ajStrNewRef

String referencing function which returns a pointer to the string passed in and increases its reference count.

Prototype

AjPStr ajStrNewRef (
      AjPStr refstr
);

TypeNameRead/WriteDescription
AjPStrrefstrModifyAJAX string object
AjPStr RETURNPointer to the string passed as an argument, with its use count increased by 1.

From EMBOSS 4.0.0


Function ajStrNewRes

String constructor which allocates memory for a string of an initial reserved size (including a possible null).

Prototype

AjPStr ajStrNewRes (
      size_t size
);

TypeNameRead/WriteDescription
size_tsizeInputReserved size (including a possible null).
AjPStr RETURNPointer to an empty string of specified size.

From EMBOSS 4.0.0


Function ajStrNewResC

String constructor which allocates memory for a string of an initial reserved size (including a possible null) and initialises it with the text string provided.

Prototype

AjPStr ajStrNewResC (
      const char* txt,
      size_t size
);

TypeNameRead/WriteDescription
const char*txtInputNull-terminated character string to initialise the new string.
size_tsizeInputReserved size (including a possible null).
AjPStr RETURNPointer to a string of the specified size containing the supplied text.

From EMBOSS 4.0.0


Function ajStrNewResS

String constructor which allocates memory for a string of an initial reserved size (including a possible null) and initialises it with the string provided.

Prototype

AjPStr ajStrNewResS (
      const AjPStr str,
      size_t size
);

TypeNameRead/WriteDescription
const AjPStrstrInputString to initialise the new string.
size_tsizeInputReserved size (including a possible null).
AjPStr RETURNPointer to a string of the specified size containing the supplied text.

From EMBOSS 4.0.0


Function ajStrNewResLenC

String constructor which allocates memory for a string of a given length and of an initial reserved size (including a possible null) and initialises it with the text string provided.

Prototype

AjPStr ajStrNewResLenC (
      const char* txt,
      size_t size,
      size_t len
);

TypeNameRead/WriteDescription
const char*txtInputNull-terminated character string to initialise the new string.
size_tsizeInputReserved size, including a trailing null and possible space for expansion
size_tlenInputLength of txt to save calculation time.
AjPStr RETURNPointer to a string of the specified size containing the supplied text.

From EMBOSS 4.0.0


AjPStr: destructors

Functions for destruction of string objects.

Functions:
MAJSTRDEL
ajStrDelDefault string destructor which frees memory for a string.
ajStrDelStaticString dereferencing function which sets a string pointer to NULL and decrements the use count of the string to which it referred. Strings with a use count of 1 are *not* freed to avoid freeing and reallocating memory when they are reused.
ajStrDelarrayDefault string destructor which frees memory for an array of strings.


Macro MAJSTRDEL

Default string destructor which frees memory for a string.A macro version of {ajStrDel} available in case it is needed for speed. In release 6.5.0

Function ajStrDel

Default string destructor which frees memory for a string.

Prototype

void ajStrDel (
      AjPStr* Pstr
);

TypeNameRead/WriteDescription
AjPStr*PstrDeletePointer to the string to be deleted. The pointer is always deleted.
void RETURN

From EMBOSS 1.0.0


Function ajStrDelStatic

String dereferencing function which sets a string pointer to NULL and decrements the use count of the string to which it referred. Strings with a use count of 1 are *not* freed to avoid freeing and reallocating memory when they are reused.

Prototype

AjBool ajStrDelStatic (
      AjPStr* Pstr
);

TypeNameRead/WriteDescription
AjPStr*PstrOutputPointer to the string to be deleted.
AjBool RETURNTrue if the string exists and can be reused False if the string was deleted.

From EMBOSS 4.0.0


Function ajStrDelarray

Default string destructor which frees memory for an array of strings.

Prototype

void ajStrDelarray (
      AjPStr** PPstr
);

TypeNameRead/WriteDescription
AjPStr**PPstrDeletePointer to the string array to be deleted. The last string is a NULL pointer The pointer is always deleted.
void RETURN

From EMBOSS 4.0.0


AjPStr: assignment

Functions for assigning a string.

Functions:
ajStrAssignCCopy a text string to a string.
ajStrAssignKCopy a single character to a string.
ajStrAssignSCopy a string to a string.
ajStrAssignClearClear the string value
ajStrAssignEmptyCEnsures a string is set (has a value). If the string is set it is left alone, otherwise it is initialised with a text string.
ajStrAssignEmptySEnsures a string is set (has a value). If the string is set it is left alone, otherwise it is initialised with a string.
ajStrAssignLenCCopy a text string of a given length to a string.
ajStrAssignRefString referencing function which makes a string point to another. Increases the reference count of the string pointed to.
ajStrAssignResCCopy a text string to a string with a minimum reserved size.
ajStrAssignResSCopy a string to a string with a minimum reserved size.
ajStrAssignSubCCopies a substring of a text string to a string.
ajStrAssignSubSCopies a substring of a string to a string.


Function ajStrAssignC

Copy a text string to a string.

Prototype

AjBool ajStrAssignC (
      AjPStr* Pstr,
      const char* txt
);

TypeNameRead/WriteDescription
AjPStr*PstrOutputTarget string.
const char*txtInputSource text.
AjBool RETURNajTrue if string was reallocated

From EMBOSS 4.0.0


Function ajStrAssignK

Copy a single character to a string.

Prototype

AjBool ajStrAssignK (
      AjPStr* Pstr,
      char chr
);

TypeNameRead/WriteDescription
AjPStr*PstrOutputTarget string.
charchrInputSource text.
AjBool RETURNajTrue if string was reallocated

From EMBOSS 4.0.0


Function ajStrAssignS

Copy a string to a string.

Prototype

AjBool ajStrAssignS (
      AjPStr* Pstr,
      const AjPStr str
);

TypeNameRead/WriteDescription
AjPStr*PstrOutputTarget string.
const AjPStrstrInputSource string.
AjBool RETURNajTrue if string was reallocated

From EMBOSS 4.0.0


Function ajStrAssignClear

Clear the string value

Prototype

AjBool ajStrAssignClear (
      AjPStr* Pstr
);

TypeNameRead/WriteDescription
AjPStr*PstrOutputTarget string.
AjBool RETURNajTrue if string was reallocated

From EMBOSS 6.0.0


Function ajStrAssignEmptyC

Ensures a string is set (has a value). If the string is set it is left alone, otherwise it is initialised with a text string.

Prototype

AjBool ajStrAssignEmptyC (
      AjPStr* Pstr,
      const char* txt
);

TypeNameRead/WriteDescription
AjPStr*PstrOutputTarget string which is overwritten.
const char*txtInputSource text.
AjBool RETURNajTrue if string was reallocated

From EMBOSS 4.0.0


Function ajStrAssignEmptyS

Ensures a string is set (has a value). If the string is set it is left alone, otherwise it is initialised with a string.

Prototype

AjBool ajStrAssignEmptyS (
      AjPStr* Pstr,
      const AjPStr str
);

TypeNameRead/WriteDescription
AjPStr*PstrOutputTarget string which is overwritten.
const AjPStrstrInputSource string object.
AjBool RETURNajTrue if string was reallocated

From EMBOSS 4.0.0


Function ajStrAssignLenC

Copy a text string of a given length to a string.

Prototype

AjBool ajStrAssignLenC (
      AjPStr* Pstr,
      const char* txt,
      size_t len
);

TypeNameRead/WriteDescription
AjPStr*PstrOutputTarget string.
const char*txtInputSource text.
size_tlenInputLength of source text.
AjBool RETURNajTrue if string was reallocated

From EMBOSS 4.0.0


Function ajStrAssignRef

String referencing function which makes a string point to another. Increases the reference count of the string pointed to.

Prototype

AjBool ajStrAssignRef (
      AjPStr* Pstr,
      AjPStr refstr
);

TypeNameRead/WriteDescription
AjPStr*PstrOutputTarget string which is overwritten.
AjPStrrefstrModifySource string object Copy by reference count so not const.
AjBool RETURNajTrue if string was reallocated

From EMBOSS 4.0.0


Function ajStrAssignResC

Copy a text string to a string with a minimum reserved size.

Prototype

AjBool ajStrAssignResC (
      AjPStr* Pstr,
      size_t size,
      const char* txt
);

TypeNameRead/WriteDescription
AjPStr*PstrOutputTarget string.
size_tsizeInputSpace to reserve.
const char*txtInputSource text.
AjBool RETURNajTrue if string was reallocated

From EMBOSS 4.0.0


Function ajStrAssignResS

Copy a string to a string with a minimum reserved size.

Prototype

AjBool ajStrAssignResS (
      AjPStr* Pstr,
      size_t size,
      const AjPStr str
);

TypeNameRead/WriteDescription
AjPStr*PstrOutputTarget string.
size_tsizeInputSize of new string.
const AjPStrstrInputSource text.
AjBool RETURNajTrue if string was reallocated

From EMBOSS 4.0.0


Function ajStrAssignSubC

Copies a substring of a text string to a string.

Prototype

AjBool ajStrAssignSubC (
      AjPStr* Pstr,
      const char* txt,
      ajlong pos1,
      ajlong pos2
);

TypeNameRead/WriteDescription
AjPStr*PstrOutputTarget string
const char*txtInputSource text
ajlongpos1Inputstart position for substring
ajlongpos2Inputend position for substring
AjBool RETURNajTrue if string was reallocated

From EMBOSS 4.0.0


Function ajStrAssignSubS

Copies a substring of a string to a string.

Prototype

AjBool ajStrAssignSubS (
      AjPStr* Pstr,
      const AjPStr str,
      ajlong pos1,
      ajlong pos2
);

TypeNameRead/WriteDescription
AjPStr*PstrOutputTarget string
const AjPStrstrInputSource string
ajlongpos1InputStart position in src of substring
ajlongpos2InputEnd position in src of substring
AjBool RETURNajTrue if Pstr was (re)allocated, ajFalse otherwise

Usage

Pstr: memory will be automatically allocated if required

pos1: negative values count from the end of the string with -1 as the last position

pos2: negative values count from the end of the string with -1 as the last position From EMBOSS 1.0.0


AjPStr: combination functions

Functions for appending, inserting or overwriting a string or substring to another.

Functions:
ajStrAppendCAppends a text string to the end of a string.
ajStrAppendKAppends a character to the end of a string.
ajStrAppendSAppends a string to the end of another string.
ajStrAppendCountKAppends any number of a given character to the end of a string.
ajStrAppendLenCAppends a text string of a given length to the end of a string.
ajStrAppendSubCAppends a substring of a string to the end of another string.
ajStrAppendSubSAppends a substring of a string to the end of another string.
ajStrInsertCInsert a text string into a string at a specified position.
ajStrInsertKInserts a character into a string at a specified position.
ajStrInsertSInserts a text string into a string at a specified position.
ajStrJoinCCut down string at pos1 and add string2 from position pos2.
ajStrJoinSAppends one string to another after cutting both strings.
ajStrMaskIdentMasks out characters from a string that are identical to a second string.
ajStrMaskRangeMasks out characters from a string over a specified range.
ajStrPasteSOverwrite one string with another.
ajStrPasteCountKOverwrites a string with a number of single characters.
ajStrPasteMaxCOverwrite one string with a specified number of characters from a text string.
ajStrPasteMaxSOverwrite one string with a specified number of characters from another string.


Function ajStrAppendC

Appends a text string to the end of a string.

Prototype

AjBool ajStrAppendC (
      AjPStr* Pstr,
      const char* txt
);

TypeNameRead/WriteDescription
AjPStr*PstrOutputTarget string
const char*txtInputSource text
AjBool RETURNajTrue if string was reallocated

From EMBOSS 4.0.0


Function ajStrAppendK

Appends a character to the end of a string.

Prototype

AjBool ajStrAppendK (
      AjPStr* Pstr,
      char chr
);

TypeNameRead/WriteDescription
AjPStr*PstrOutputTarget string
charchrInputSource character
AjBool RETURNajTrue if string was reallocated

From EMBOSS 4.0.0


Function ajStrAppendS

Appends a string to the end of another string.

Prototype

AjBool ajStrAppendS (
      AjPStr* Pstr,
      const AjPStr str
);

TypeNameRead/WriteDescription
AjPStr*PstrOutputTarget string
const AjPStrstrInputSource string
AjBool RETURNajTrue if string was reallocated

From EMBOSS 4.0.0


Function ajStrAppendCountK

Appends any number of a given character to the end of a string.

Prototype

AjBool ajStrAppendCountK (
      AjPStr* Pstr,
      char chr,
      ajulong num
);

TypeNameRead/WriteDescription
AjPStr*PstrOutputTarget string
charchrInputSource character
ajulongnumInputRepeat count
AjBool RETURNajTrue if string was reallocated

From EMBOSS 4.0.0


Function ajStrAppendLenC

Appends a text string of a given length to the end of a string.

Prototype

AjBool ajStrAppendLenC (
      AjPStr* Pstr,
      const char* txt,
      size_t len
);

TypeNameRead/WriteDescription
AjPStr*PstrOutputTarget string
const char*txtInputSource text
size_tlenInputString length
AjBool RETURNajTrue if string was reallocated

From EMBOSS 4.0.0


Function ajStrAppendSubC

Appends a substring of a string to the end of another string.

Prototype

AjBool ajStrAppendSubC (
      AjPStr* Pstr,
      const char* txt,
      ajlong pos1,
      ajlong pos2
);

TypeNameRead/WriteDescription
AjPStr*PstrOutputTarget string
const char*txtInputSource string
ajlongpos1Inputstart position for substring
ajlongpos2Inputend position for substring
AjBool RETURNajTrue if string was reallocated

From EMBOSS 6.0.0


Function ajStrAppendSubS

Appends a substring of a string to the end of another string.

Prototype

AjBool ajStrAppendSubS (
      AjPStr* Pstr,
      const AjPStr str,
      ajlong pos1,
      ajlong pos2
);

TypeNameRead/WriteDescription
AjPStr*PstrOutputTarget string
const AjPStrstrInputSource string
ajlongpos1Inputstart position for substring
ajlongpos2Inputend position for substring
AjBool RETURNajTrue if string was reallocated

From EMBOSS 4.0.0


Function ajStrInsertC

Insert a text string into a string at a specified position.

Prototype

AjBool ajStrInsertC (
      AjPStr* Pstr,
      ajlong pos,
      const char* txt 
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyTarget string
ajlongposInputPosition where text is to be inserted. Negative position counts from the end
const char*txtInputText to be inserted
AjBool RETURNajTrue if string was reallocated

From EMBOSS 1.0.0


Function ajStrInsertK

Inserts a character into a string at a specified position.

Prototype

AjBool ajStrInsertK (
      AjPStr* Pstr,
      ajlong pos,
      char chr 
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyTarget string
ajlongposInputPosition where text is to be inserted. Negative position counts from the end
charchrInputText to be inserted
AjBool RETURNajTrue if string was reallocated

From EMBOSS 2.9.0


Function ajStrInsertS

Inserts a text string into a string at a specified position.

Prototype

AjBool ajStrInsertS (
      AjPStr* Pstr,
      ajlong pos,
      const AjPStr str
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyTarget string
ajlongposInputPosition where text is to be inserted. Negative position counts from the end
const AjPStrstrInputString to be inserted
AjBool RETURNajTrue on successful completion else ajFalse;

From EMBOSS 4.0.0


Function ajStrJoinC

Cut down string at pos1 and add string2 from position pos2.

Prototype

AjBool ajStrJoinC (
      AjPStr* Pstr,
      ajlong pos,
      const char* txt,
      ajlong posb
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyTarget string.
ajlongposInputNumber of characters to keep in target string.
const char*txtInputText to append.
ajlongposbInputPosition of first character to copy from text.
AjBool RETURNajTrue on success

From EMBOSS 1.0.0


Function ajStrJoinS

Appends one string to another after cutting both strings.

Prototype

AjBool ajStrJoinS (
      AjPStr* Pstr,
      ajlong pos,
      const AjPStr str,
      ajlong posb
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyTarget string.
ajlongposInputStart position in target string, negative numbers count from the end.
const AjPStrstrInputString to append.
ajlongposbInputStarts position to copy, negative numbers count from the end.
AjBool RETURNajTrue on success.

From EMBOSS 4.0.0


Function ajStrMaskIdent

Masks out characters from a string that are identical to a second string.

Prototype

AjBool ajStrMaskIdent (
      AjPStr* Pstr,
      const AjPStr str,
      char maskchr
);

TypeNameRead/WriteDescription
AjPStr*PstrOutputTarget string
const AjPStrstrInputComparison string
charmaskchrInputmasking character
AjBool RETURNajTrue on success

From EMBOSS 6.1.0


Function ajStrMaskRange

Masks out characters from a string over a specified range.

Prototype

AjBool ajStrMaskRange (
      AjPStr* Pstr,
      ajlong pos1,
      ajlong pos2,
      char maskchr
);

TypeNameRead/WriteDescription
AjPStr*PstrOutputTarget string
ajlongpos1Inputstart position to be masked
ajlongpos2Inputend position to be masked
charmaskchrInputmasking character
AjBool RETURNajTrue on success, ajFalse if begin is out of range

From EMBOSS 6.1.0


Function ajStrPasteS

Overwrite one string with another.

Prototype

AjBool ajStrPasteS (
      AjPStr* Pstr,
      ajlong pos,
      const AjPStr str
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyTarget string
ajlongposInputPosition in target string
const AjPStrstrInputString to replace.
AjBool RETURNajTrue on success

From EMBOSS 4.0.0


Function ajStrPasteCountK

Overwrites a string with a number of single characters.

Prototype

AjBool ajStrPasteCountK (
      AjPStr* Pstr,
      ajlong pos,
      char chr,
      ajulong num
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyTarget string
ajlongposInputposition in string
charchrInputCharacter to replace.
ajulongnumInputNumber of characters to copy from text.
AjBool RETURNajTrue on success

From EMBOSS 4.0.0


Function ajStrPasteMaxC

Overwrite one string with a specified number of characters from a text string.

Prototype

AjBool ajStrPasteMaxC (
      AjPStr* Pstr,
      ajlong pos,
      const char* txt,
      size_t len
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyTarget string
ajlongposInputStart position in target string.
const char*txtInputString to replace.
size_tlenInputNumber of characters to copy from text.
AjBool RETURNajTrue on success

From EMBOSS 4.0.0


Function ajStrPasteMaxS

Overwrite one string with a specified number of characters from another string.

Prototype

AjBool ajStrPasteMaxS (
      AjPStr* Pstr,
      ajlong pos,
      const AjPStr str,
      size_t len
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyTarget string
ajlongposInputStart position in target string.
const AjPStrstrInputReplacement string
size_tlenInputNumber of characters to copy from text.
AjBool RETURNajTrue on success

From EMBOSS 4.0.0


AjPStr: cutting

Functions for removing characters or regions (substrings) from a string.

Functions:
ajStrCutBracesRemoves comments enclosed in braces from a string.
ajStrCutCommentsRemoves comments from a string.
ajStrCutCommentsRestposRemoves comments from a string.
ajStrCutCommentsStartRemoves comments from a string.
ajStrCutEndRemoves a number of characters from the end of a string
ajStrCutRangeRemoves a substring from a string.
ajStrCutStartRemoves a number of characters from the start of a string
ajStrKeepRangeReduces target string to a substring of itself by deleting all except a range of character positions.
ajStrKeepSetCRemoves all characters from a string that are not in a given set.
ajStrKeepSetFilterRemoves all characters from a string that are not defined by a filter
ajStrKeepSetSRemoves all characters from a string that are not in a given set.
ajStrKeepSetAlphaRemoves all characters from a string that are not alphabetic.
ajStrKeepSetAlphaCRemoves all characters from a string that are not alphabetic and are not in a given set.
ajStrKeepSetAlphaSRemoves all characters from a string that are not alphabetic and are not in a given set.
ajStrKeepSetAlphaRestRemoves all characters from a string that are not alphabetic.
ajStrKeepSetAlphaRestCRemoves all characters from a string that are not alphabetic and are not in a given set.
ajStrKeepSetAlphaRestSRemoves all characters from a string that are not alphabetic and are not in a given set.
ajStrKeepSetAsciiRemoves all characters from a string that are not within a range of ASCII character codes.
ajStrQuoteStripRemoves any double quotes from a string.
ajStrQuoteStripAllRemoves any single or double quotes from a string.
ajStrRemoveDupcharRemoves duplicate characters from a string
ajStrRemoveGapRemoves non-sequence characters (all but alphabetic characters and asterisk) from a string.
ajStrRemoveGapFRemoves non-sequence characters (all but alphabetic characters and asterisk) from a string. Also removes floats from an array of the same size
ajStrRemoveHtmlRemoves html from a string.
ajStrRemoveLastNewlineRemoves last character from a string if it is a newline character.
ajStrRemoveSetCRemoves all of a given set of characters from a string.
ajStrRemoveWhiteRemoves all whitespace characters from a string.
ajStrRemoveWhiteExcessRemoves excess whitespace characters from a string.
ajStrRemoveWhiteSpacesRemoves excess space characters from a string.
ajStrRemoveWildRemoves all characters after the first wildcard character (if found).
ajStrTrimCRemoves regions with a given character composition from start and end of a string.
ajStrTrimEndCRemoves a region with a given character composition from end of a string.
ajStrTrimStartCRemoves a region with a given character composition from start of a string.
ajStrTrimWhiteRemoves regions composed of white space characters only from the start and end of a string.
ajStrTrimWhiteEndRemoves regions composed of white space characters only from the end of a string.
ajStrTrimWhiteStartRemoves regions composed of white space characters only from the start of a string.
ajStrTruncateLenRemoves the end from a string reducing it to a defined length.
ajStrTruncatePosRemoves the end from a string by cutting at a defined position.


Function ajStrCutBraces

Removes comments enclosed in braces from a string.

Prototype

AjBool ajStrCutBraces (
      AjPStr* Pstr
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyLine of text from input file
AjBool RETURNajTrue if there is some text remaining

From EMBOSS 6.4.0


Function ajStrCutComments

Removes comments from a string.

Prototype

AjBool ajStrCutComments (
      AjPStr* Pstr
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyLine of text from input file
AjBool RETURNajTrue if there is some text remaining

From EMBOSS 4.0.0


Function ajStrCutCommentsRestpos

Removes comments from a string.

Prototype

AjBool ajStrCutCommentsRestpos (
      AjPStr* Pstr,
      AjPStr* Pcomment,
      size_t* Pstartpos
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyLine of text from input file
AjPStr*PcommentOutputComment characters deleted
size_t*PstartposOutputComment start position
AjBool RETURNajTrue if there is some text remaining

From EMBOSS 6.0.0


Function ajStrCutCommentsStart

Removes comments from a string.

Prototype

AjBool ajStrCutCommentsStart (
      AjPStr* Pstr
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyLine of text from input file
AjBool RETURNajTrue if there is some text remaining

From EMBOSS 4.0.0


Function ajStrCutEnd

Removes a number of characters from the end of a string

Prototype

AjBool ajStrCutEnd (
      AjPStr* Pstr,
      size_t len
);

TypeNameRead/WriteDescription
AjPStr*PstrModifystring
size_tlenInputNumber of characters to delete from the end
AjBool RETURNajTrue if string was reallocated

From EMBOSS 4.0.0


Function ajStrCutRange

Removes a substring from a string.

Prototype

AjBool ajStrCutRange (
      AjPStr* Pstr,
      ajlong pos1,
      ajlong pos2
);

TypeNameRead/WriteDescription
AjPStr*PstrOutputTarget string
ajlongpos1Inputstart position to be cut
ajlongpos2Inputend position to be cut
AjBool RETURNajTrue on success, ajFalse if begin is out of range

From EMBOSS 4.0.0


Function ajStrCutStart

Removes a number of characters from the start of a string

Prototype

AjBool ajStrCutStart (
      AjPStr* Pstr,
      size_t len
);

TypeNameRead/WriteDescription
AjPStr*PstrModifystring
size_tlenInputNumber of characters to delete from the start
AjBool RETURNajTrue if string was reallocated

From EMBOSS 4.0.0


Function ajStrKeepRange

Reduces target string to a substring of itself by deleting all except a range of character positions.

Prototype

AjBool ajStrKeepRange (
      AjPStr* Pstr,
      ajlong pos1,
      ajlong pos2
);

TypeNameRead/WriteDescription
AjPStr*PstrOutputTarget string.
ajlongpos1InputStart position for substring.
ajlongpos2InputEnd position for substring.
AjBool RETURNajTrue if string was reallocated

From EMBOSS 4.0.0


Function ajStrKeepSetC

Removes all characters from a string that are not in a given set.

Prototype

AjBool ajStrKeepSetC (
      AjPStr* Pstr,
      const char* txt
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyString to clean.
const char*txtInputCharacter set to keep
AjBool RETURNajTrue if string was reallocated

From EMBOSS 4.0.0


Function ajStrKeepSetFilter

Removes all characters from a string that are not defined by a filter

Prototype

AjBool ajStrKeepSetFilter (
      AjPStr* Pstr,
      const char* filter
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyString
const char*filterInputFilter non-zero for each allowed value
AjBool RETURNajTrue if the string is entirely composed of characters in the specified set

From EMBOSS 6.6.0


Function ajStrKeepSetS

Removes all characters from a string that are not in a given set.

Prototype

AjBool ajStrKeepSetS (
      AjPStr* Pstr,
      const AjPStr str
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyString to clean.
const AjPStrstrInputCharacter set to keep
AjBool RETURNajTrue if string is not empty

From EMBOSS 4.1.0


Function ajStrKeepSetAlpha

Removes all characters from a string that are not alphabetic.

Prototype

AjBool ajStrKeepSetAlpha (
      AjPStr* Pstr
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyString to clean.
AjBool RETURNajTrue if string is not empty

From EMBOSS 4.1.0


Function ajStrKeepSetAlphaC

Removes all characters from a string that are not alphabetic and are not in a given set.

Prototype

AjBool ajStrKeepSetAlphaC (
      AjPStr* Pstr,
      const char* txt
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyString to clean.
const char*txtInputNon-alphabetic character set to keep
AjBool RETURNajTrue if string is not empty

From EMBOSS 4.0.0


Function ajStrKeepSetAlphaS

Removes all characters from a string that are not alphabetic and are not in a given set.

Prototype

AjBool ajStrKeepSetAlphaS (
      AjPStr* Pstr,
      const AjPStr str
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyString to clean.
const AjPStrstrInputNon-alphabetic character set to keep
AjBool RETURNajTrue if string is not empty

From EMBOSS 5.0.0


Function ajStrKeepSetAlphaRest

Removes all characters from a string that are not alphabetic.

Prototype

AjBool ajStrKeepSetAlphaRest (
      AjPStr* Pstr,
      AjPStr* Prest
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyString to clean.
AjPStr*PrestModifyExcluded non-whitespace characters.
AjBool RETURNajTrue if string is not empty

From EMBOSS 5.0.0


Function ajStrKeepSetAlphaRestC

Removes all characters from a string that are not alphabetic and are not in a given set.

Prototype

AjBool ajStrKeepSetAlphaRestC (
      AjPStr* Pstr,
      const char* txt,
      AjPStr* Prest
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyString to clean.
const char*txtInputNon-alphabetic character set to keep
AjPStr*PrestModifyExcluded non-whitespace characters.
AjBool RETURNajTrue if string is not empty

From EMBOSS 5.0.0


Function ajStrKeepSetAlphaRestS

Removes all characters from a string that are not alphabetic and are not in a given set.

Prototype

AjBool ajStrKeepSetAlphaRestS (
      AjPStr* Pstr,
      const AjPStr str,
      AjPStr* Prest
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyString to clean.
const AjPStrstrInputNon-alphabetic character set to keep
AjPStr*PrestModifyExcluded non-whitespace characters.
AjBool RETURNajTrue if string is not empty

From EMBOSS 5.0.0


Function ajStrKeepSetAscii

Removes all characters from a string that are not within a range of ASCII character codes.

Prototype

AjBool ajStrKeepSetAscii (
      AjPStr* Pstr,
      int minchar,
      int maxchar
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyString to clean.
intmincharInputLowest ASCII code to keep
intmaxcharInputHighest ASCII code to keep
AjBool RETURNajTrue if string is not empty

From EMBOSS 6.1.0


Function ajStrQuoteStrip

Removes any double quotes from a string.

Prototype

AjBool ajStrQuoteStrip (
      AjPStr* Pstr
);

TypeNameRead/WriteDescription
AjPStr*PstrModifystring
AjBool RETURNajTrue if string is not empty

From EMBOSS 2.0.1


Function ajStrQuoteStripAll

Removes any single or double quotes from a string.

Prototype

AjBool ajStrQuoteStripAll (
      AjPStr* Pstr
);

TypeNameRead/WriteDescription
AjPStr*PstrModifystring
AjBool RETURNTrue on success

From EMBOSS 3.0.0


Function ajStrRemoveDupchar

Removes duplicate characters from a string

Prototype

AjBool ajStrRemoveDupchar (
      AjPStr* Pstr
);

TypeNameRead/WriteDescription
AjPStr*PstrOutputString
AjBool RETURNTrue if string is not empty

From EMBOSS 6.2.0


Function ajStrRemoveGap

Removes non-sequence characters (all but alphabetic characters and asterisk) from a string.

Prototype

AjBool ajStrRemoveGap (
      AjPStr* Pstr
);

TypeNameRead/WriteDescription
AjPStr*PstrOutputString
AjBool RETURNTrue if string is not empty

From EMBOSS 4.0.0


Function ajStrRemoveGapF

Removes non-sequence characters (all but alphabetic characters and asterisk) from a string. Also removes floats from an array of the same size

Prototype

AjBool ajStrRemoveGapF (
      AjPStr* Pstr,
      float* Pfloat
);

TypeNameRead/WriteDescription
AjPStr*PstrOutputString
float*PfloatOutputFloating point array (e.g. quality scores)
AjBool RETURNTrue if string is not empty

From EMBOSS 6.2.0


Function ajStrRemoveHtml

Removes html from a string.

Prototype

AjBool ajStrRemoveHtml (
      AjPStr* Pstr
);

TypeNameRead/WriteDescription
AjPStr*PstrOutputString
AjBool RETURNajTrue on success

From EMBOSS 1.9.0


Function ajStrRemoveLastNewline

Removes last character from a string if it is a newline character.

Prototype

AjBool ajStrRemoveLastNewline (
      AjPStr* Pstr
);

TypeNameRead/WriteDescription
AjPStr*PstrOutputString
AjBool RETURNTrue is string is not empty

From EMBOSS 4.0.0


Function ajStrRemoveSetC

Removes all of a given set of characters from a string.

Prototype

AjBool ajStrRemoveSetC (
      AjPStr* Pstr,
      const char* txt
);

TypeNameRead/WriteDescription
AjPStr*PstrOutputString
const char*txtInputcharacters to remove
AjBool RETURNTrue on success

From EMBOSS 4.0.0


Function ajStrRemoveWhite

Removes all whitespace characters from a string.

Prototype

AjBool ajStrRemoveWhite (
      AjPStr* Pstr
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyString to clean.
AjBool RETURNajTrue if string was reallocated

From EMBOSS 4.0.0


Function ajStrRemoveWhiteExcess

Removes excess whitespace characters from a string.

Prototype

AjBool ajStrRemoveWhiteExcess (
      AjPStr* Pstr
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyString to clean.
AjBool RETURNajTrue if string was reallocated

From EMBOSS 4.0.0


Function ajStrRemoveWhiteSpaces

Removes excess space characters from a string.

Prototype

AjBool ajStrRemoveWhiteSpaces (
      AjPStr* Pstr
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyString to clean.
AjBool RETURNajTrue if string was reallocated

From EMBOSS 4.1.0


Function ajStrRemoveWild

Removes all characters after the first wildcard character (if found).

Prototype

AjBool ajStrRemoveWild (
      AjPStr* Pstr
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyString
AjBool RETURNajTrue if the string contained a wildcard and was truncated.

From EMBOSS 4.0.0


Function ajStrTrimC

Removes regions with a given character composition from start and end of a string.

Prototype

AjBool ajStrTrimC (
      AjPStr* Pstr,
      const char* txt
);

TypeNameRead/WriteDescription
AjPStr*PstrModifystring
const char*txtInputCharacters to delete from each end
AjBool RETURNajTrue if string was reallocated

From EMBOSS 1.0.0


Function ajStrTrimEndC

Removes a region with a given character composition from end of a string.

Prototype

AjBool ajStrTrimEndC (
      AjPStr* Pstr,
      const char* txt
);

TypeNameRead/WriteDescription
AjPStr*PstrModifystring
const char*txtInputCharacters to delete from the end
AjBool RETURNajTrue if string was reallocated

From EMBOSS 2.3.1


Function ajStrTrimStartC

Removes a region with a given character composition from start of a string.

Prototype

AjBool ajStrTrimStartC (
      AjPStr* Pstr,
      const char* txt
);

TypeNameRead/WriteDescription
AjPStr*PstrModifystring
const char*txtInputCharacters to delete from the end
AjBool RETURNajTrue if string was reallocated

From EMBOSS 3.0.0


Function ajStrTrimWhite

Removes regions composed of white space characters only from the start and end of a string.

Prototype

AjBool ajStrTrimWhite (
      AjPStr* Pstr
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyString
AjBool RETURNajTrue if string was reallocated

From EMBOSS 4.0.0


Function ajStrTrimWhiteEnd

Removes regions composed of white space characters only from the end of a string.

Prototype

AjBool ajStrTrimWhiteEnd (
      AjPStr* Pstr
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyString
AjBool RETURNajTrue if string was reallocated

From EMBOSS 4.0.0


Function ajStrTrimWhiteStart

Removes regions composed of white space characters only from the start of a string.

Prototype

AjBool ajStrTrimWhiteStart (
      AjPStr* Pstr
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyString
AjBool RETURNajTrue if string was reallocated

From EMBOSS 6.2.0


Function ajStrTruncateLen

Removes the end from a string reducing it to a defined length.

Prototype

AjBool ajStrTruncateLen (
      AjPStr* Pstr,
      size_t len
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyTarget string
size_tlenInputLength of required string.
AjBool RETURNajTrue if string was reallocated

From EMBOSS 4.0.0


Function ajStrTruncatePos

Removes the end from a string by cutting at a defined position.

Prototype

AjBool ajStrTruncatePos (
      AjPStr* Pstr,
      ajlong pos
);

TypeNameRead/WriteDescription
AjPStr*PstrModifytarget string
ajlongposInputFirst position to be deleted. Negative values count from the end
AjBool RETURNTrue is string was reallocated

From EMBOSS 4.0.0


AjPStr: substitution

Functions for substitutions of characters or regions (substrings) within a string.

Functions:
ajStrExchangeCCReplace all occurrences in a string of one substring with another.
ajStrExchangeCSReplace all occurrences in a string of one substring with another.
ajStrExchangeKKReplace all occurrences in a string of one character with another.
ajStrExchangeSCReplace all occurrences in a string of one substring with another.
ajStrExchangeSSReplace all occurrences in a string of one substring with another.
ajStrExchangePosCCReplace one substring with another at a given position in the text.
ajStrExchangeSetCCReplace all occurrences in a string of one set of characters with another set.
ajStrExchangeSetSSReplace all occurrences in a string of one set of characters with another set.
ajStrExchangeSetRestCKReplace all occurrences in a string of one set of characters with a substitute character
ajStrExchangeSetRestSKReplace all occurrences in a string not in one set of characters with a substitute character.
ajStrRandomRandomly rearranges the characters in a string.
ajStrReverseReverses the order of characters in a string


Function ajStrExchangeCC

Replace all occurrences in a string of one substring with another.

Prototype

AjBool ajStrExchangeCC (
      AjPStr* Pstr,
      const char* txt,
      const char* txtnew
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyTarget string.
const char*txtInputstring to replace.
const char*txtnewInputstring to insert.
AjBool RETURNajTrue if string was reallocated

From EMBOSS 4.0.0


Function ajStrExchangeCS

Replace all occurrences in a string of one substring with another.

Prototype

AjBool ajStrExchangeCS (
      AjPStr* Pstr,
      const char* txt,
      const AjPStr strnew
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyTarget string.
const char*txtInputstring to replace.
const AjPStrstrnewInputstring to insert.
AjBool RETURNajTrue if string was reallocated

From EMBOSS 4.0.0


Function ajStrExchangeKK

Replace all occurrences in a string of one character with another.

Prototype

AjBool ajStrExchangeKK (
      AjPStr* Pstr,
      char chr,
      char chrnew
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyTarget string.
charchrInputCharacter to replace.
charchrnewInputCharacter to insert.
AjBool RETURNajTrue if string was reallocated

From EMBOSS 4.0.0


Function ajStrExchangeSC

Replace all occurrences in a string of one substring with another.

Prototype

AjBool ajStrExchangeSC (
      AjPStr* Pstr,
      const AjPStr str,
      const char* txtnew
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyTarget string.
const AjPStrstrInputstring to replace.
const char*txtnewInputstring to insert.
AjBool RETURNajTrue if string was reallocated

From EMBOSS 4.0.0


Function ajStrExchangeSS

Replace all occurrences in a string of one substring with another.

Prototype

AjBool ajStrExchangeSS (
      AjPStr* Pstr,
      const AjPStr str,
      const AjPStr strnew
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyTarget string.
const AjPStrstrInputstring to replace.
const AjPStrstrnewInputstring to insert.
AjBool RETURNajTrue if string was reallocated

From EMBOSS 4.0.0


Function ajStrExchangePosCC

Replace one substring with another at a given position in the text.

Prototype

AjBool ajStrExchangePosCC (
      AjPStr* Pstr,
      ajlong ipos,
      const char* txt,
      const char* txtnew
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyTarget string.
ajlongiposInputPosition in the string, negative values are from the end of the string.
const char*txtInputstring to replace.
const char*txtnewInputstring to insert.
AjBool RETURNajTrue if string was reallocated

From EMBOSS 5.0.0


Function ajStrExchangeSetCC

Replace all occurrences in a string of one set of characters with another set.

Prototype

AjBool ajStrExchangeSetCC (
      AjPStr* Pstr,
      const char* txt,
      const char* txtnew
);

TypeNameRead/WriteDescription
AjPStr*PstrOutputString
const char*txtInputUnwanted characters
const char*txtnewInputReplacement characters
AjBool RETURNajTrue if string was reallocated

From EMBOSS 4.0.0


Function ajStrExchangeSetSS

Replace all occurrences in a string of one set of characters with another set.

Prototype

AjBool ajStrExchangeSetSS (
      AjPStr* Pstr,
      const AjPStr str,
      const AjPStr strnew
);

TypeNameRead/WriteDescription
AjPStr*PstrOutputString
const AjPStrstrInputUnwanted characters
const AjPStrstrnewInputReplacement characters
AjBool RETURNajTrue if string was reallocated

From EMBOSS 4.0.0


Function ajStrExchangeSetRestCK

Replace all occurrences in a string of one set of characters with a substitute character

Prototype

AjBool ajStrExchangeSetRestCK (
      AjPStr* Pstr,
      const char* txt,
      char chrnew
);

TypeNameRead/WriteDescription
AjPStr*PstrOutputString
const char*txtInputWanted characters
charchrnewInputReplacement character
AjBool RETURNajTrue if string was reallocated

From EMBOSS 4.1.0


Function ajStrExchangeSetRestSK

Replace all occurrences in a string not in one set of characters with a substitute character.

Prototype

AjBool ajStrExchangeSetRestSK (
      AjPStr* Pstr,
      const AjPStr str,
      char chrnew
);

TypeNameRead/WriteDescription
AjPStr*PstrOutputString
const AjPStrstrInputWanted characters
charchrnewInputReplacement character
AjBool RETURNajTrue if string was reallocated

From EMBOSS 4.1.0


Function ajStrRandom

Randomly rearranges the characters in a string.

Prototype

AjBool ajStrRandom (
      AjPStr* Pstr
);

TypeNameRead/WriteDescription
AjPStr*PstrModifystring
AjBool RETURNTrue unless string is empty

From EMBOSS 1.0.0


Function ajStrReverse

Reverses the order of characters in a string

Prototype

AjBool ajStrReverse (
      AjPStr* Pstr
);

TypeNameRead/WriteDescription
AjPStr*PstrOutputTarget string
AjBool RETURNajTrue if string was reallocated

From EMBOSS 4.0.0


AjPStr: query

Functions for querying the properties of strings.

Functions:
ajStrCalcCountCCounts occurrences of set of characters in a string.
ajStrCalcCountKCounts occurrences of a character in a string.
ajStrHasParenthesesTests whether a string contains (possibly nested) pairs of parentheses.
ajStrIsAlnumTest whether a string contains alphanumeric characters only (no white space).
ajStrIsAlphaTest whether a string contains alphabetic characters only (no white space).
ajStrIsBoolTests whether a string represents a valid Boolean value.
ajStrIsCharsetCTest whether a string contains specified characters only.
ajStrIsCharsetSTest whether a string contains specified characters only.
ajStrIsCharsetCaseCTest whether a string contains specified characters only. The test is case-insensitive
ajStrIsCharsetCaseSTest whether a string contains specified characters only. The test is case-insensitive
ajStrIsDoubleTests whether a string represents a valid double precision value,
ajStrIsFilterTest whether a string contains only characters defined by a filter
ajStrIsFloatTests whether a string represents a valid floating point value.
ajStrIsHexTests whether a string represents a valid hexadecimal value.
ajStrIsIntTests whether a string represents a valid integer value.
ajStrIsLongTests whether a string represents a valid ajlong integer value.
ajStrIsLowerTests whether a string contains no upper case alphabetic characters.
ajStrIsNumTest whether a string contains decimal digits only.
ajStrIsUpperTest whether a string contains no lower case alphabetic characters.
ajStrIsWhiteTest whether a string contains whitespace characters only.
ajStrIsWildTests whether a string contains the standard wildcard characters * or ?.
ajStrIsWordTest whether a string contains no white space characters.
ajStrWholeTests whether a range refers to the whole string


Function ajStrCalcCountC

Counts occurrences of set of characters in a string.

Prototype

ajulong ajStrCalcCountC (
      const AjPStr str,
      const char* txt
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
const char*txtInputCharacters to count
ajulong RETURNNumber of times characters were found in string

From EMBOSS 4.0.0


Function ajStrCalcCountK

Counts occurrences of a character in a string.

Prototype

ajulong ajStrCalcCountK (
      const AjPStr str,
      char chr
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
charchrInputCharacter to count
ajulong RETURNNumber of times character was found in string

From EMBOSS 4.0.0


Function ajStrHasParentheses

Tests whether a string contains (possibly nested) pairs of parentheses.

Prototype

AjBool ajStrHasParentheses (
      const AjPStr str
);

TypeNameRead/WriteDescription
const AjPStrstrInputString to test
AjBool RETURNajTrue if string has zero or more () pairs with possibly other text

From EMBOSS 4.0.0


Function ajStrIsAlnum

Test whether a string contains alphanumeric characters only (no white space).

Prototype

AjBool ajStrIsAlnum (
      const AjPStr str
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
AjBool RETURNajTrue if the string is entirely alphanumeric

From EMBOSS 1.0.0


Function ajStrIsAlpha

Test whether a string contains alphabetic characters only (no white space).

Prototype

AjBool ajStrIsAlpha (
      const AjPStr str
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
AjBool RETURNajTrue if the string is entirely alphabetic

From EMBOSS 1.0.0


Function ajStrIsBool

Tests whether a string represents a valid Boolean value.

Prototype

AjBool ajStrIsBool (
      const AjPStr str
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
AjBool RETURNajTrue if the string is acceptable as a boolean.

From EMBOSS 1.0.0


Function ajStrIsCharsetC

Test whether a string contains specified characters only.

Prototype

AjBool ajStrIsCharsetC (
      const AjPStr str,
      const char* txt
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
const char*txtInputCharacter set to test
AjBool RETURNajTrue if the string is entirely composed of characters in the specified set

From EMBOSS 4.1.0


Function ajStrIsCharsetS

Test whether a string contains specified characters only.

Prototype

AjBool ajStrIsCharsetS (
      const AjPStr str,
      const AjPStr str2
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
const AjPStrstr2InputCharacter set to test
AjBool RETURNajTrue if the string is entirely composed of characters in the specified set

From EMBOSS 4.1.0


Function ajStrIsCharsetCaseC

Test whether a string contains specified characters only. The test is case-insensitive

Prototype

AjBool ajStrIsCharsetCaseC (
      const AjPStr str,
      const char* txt
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
const char*txtInputCharacter set to test
AjBool RETURNajTrue if the string is entirely composed of characters in the specified set

From EMBOSS 4.1.0


Function ajStrIsCharsetCaseS

Test whether a string contains specified characters only. The test is case-insensitive

Prototype

AjBool ajStrIsCharsetCaseS (
      const AjPStr str,
      const AjPStr str2
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
const AjPStrstr2InputCharacter set to test
AjBool RETURNajTrue if the string is entirely composed of characters in the specified set

From EMBOSS 4.1.0


Function ajStrIsDouble

Tests whether a string represents a valid double precision value,

Prototype

AjBool ajStrIsDouble (
      const AjPStr str
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
AjBool RETURNajTrue if the string is acceptable as a double precision number.

From EMBOSS 1.0.0


Function ajStrIsFilter

Test whether a string contains only characters defined by a filter

Prototype

AjBool ajStrIsFilter (
      const AjPStr str,
      const char* filter
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
const char*filterInputFilter non-zero for each allowed value
AjBool RETURNajTrue if the string is entirely composed of characters in the specified set

From EMBOSS 6.6.0


Function ajStrIsFloat

Tests whether a string represents a valid floating point value.

Prototype

AjBool ajStrIsFloat (
      const AjPStr str
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
AjBool RETURNajTrue if the string is acceptable as a floating point number.

From EMBOSS 1.0.0


Function ajStrIsHex

Tests whether a string represents a valid hexadecimal value.

Prototype

AjBool ajStrIsHex (
      const AjPStr str
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
AjBool RETURNajTrue if the string is acceptable as a hexadecimal value.

From EMBOSS 1.13.0


Function ajStrIsInt

Tests whether a string represents a valid integer value.

Prototype

AjBool ajStrIsInt (
      const AjPStr str
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
AjBool RETURNajTrue if the string is acceptable as an integer.

From EMBOSS 1.0.0


Function ajStrIsLong

Tests whether a string represents a valid ajlong integer value.

Prototype

AjBool ajStrIsLong (
      const AjPStr str
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
AjBool RETURNajTrue if the string is acceptable as an integer.

From EMBOSS 1.0.0


Function ajStrIsLower

Tests whether a string contains no upper case alphabetic characters.

Prototype

AjBool ajStrIsLower (
      const AjPStr str
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
AjBool RETURNajTrue if the string is entirely alphabetic

From EMBOSS 2.7.0


Function ajStrIsNum

Test whether a string contains decimal digits only.

Prototype

AjBool ajStrIsNum (
      const AjPStr str
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
AjBool RETURNajTrue if the string is entirely numeric

From EMBOSS 3.0.0


Function ajStrIsUpper

Test whether a string contains no lower case alphabetic characters.

Prototype

AjBool ajStrIsUpper (
      const AjPStr str
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
AjBool RETURNajTrue if the string has no lower case characters.

From EMBOSS 2.7.0


Function ajStrIsWhite

Test whether a string contains whitespace characters only.

Prototype

AjBool ajStrIsWhite (
      const AjPStr str
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
AjBool RETURNajTrue if the string is only white space (or empty).

From EMBOSS 2.9.0


Function ajStrIsWild

Tests whether a string contains the standard wildcard characters * or ?.

Prototype

AjBool ajStrIsWild (
      const AjPStr str
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
AjBool RETURNajTrue if string has wildcards.

From EMBOSS 1.0.0


Function ajStrIsWord

Test whether a string contains no white space characters.

Prototype

AjBool ajStrIsWord (
      const AjPStr str
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
AjBool RETURNajTrue if the string has no white space

From EMBOSS 1.0.0


Function ajStrWhole

Tests whether a range refers to the whole string

Prototype

AjBool ajStrWhole (
      const AjPStr str,
      ajlong pos1,
      ajlong pos2
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
ajlongpos1InputBegin position (0 start, negative from the end)
ajlongpos2InputBegin position (0 start, negative from the end)
AjBool RETURNajTrue is range covers the whole string

From EMBOSS 2.5.0


AjPStr: filters

Functions for creating filters from C-type (char*) strings).

Functions:
ajStrGetfilterReturns a filter array to test for any character in a string.
ajStrGetfilterCaseReturns a filter array to test for any character in a string. The filter is case-insensitive
ajStrGetfilterLowerReturns a filter array to test for any character in a string as lower case.
ajStrGetfilterUpperReturns a filter array to test for any character in a string as upper case.


Function ajStrGetfilter

Returns a filter array to test for any character in a string.

Prototype

char* ajStrGetfilter (
      const AjPStr str
);

TypeNameRead/WriteDescription
const AjPStrstrInputCharacter set to test
char* RETURNFilter array set to 1 for each ascii value accepted zero for any character not in the set.

From EMBOSS 6.6.0


Function ajStrGetfilterCase

Returns a filter array to test for any character in a string. The filter is case-insensitive

Prototype

char* ajStrGetfilterCase (
      const AjPStr str
);

TypeNameRead/WriteDescription
const AjPStrstrInputCharacter set to test
char* RETURNFilter array set to 1 for each ascii value accepted zero for any character not in the set.

From EMBOSS 6.6.0


Function ajStrGetfilterLower

Returns a filter array to test for any character in a string as lower case.

Prototype

char* ajStrGetfilterLower (
      const AjPStr str
);

TypeNameRead/WriteDescription
const AjPStrstrInputCharacter set to test
char* RETURNFilter array set to 1 for each ascii value accepted zero for any character not in the set.

From EMBOSS 6.6.0


Function ajStrGetfilterUpper

Returns a filter array to test for any character in a string as upper case.

Prototype

char* ajStrGetfilterUpper (
      const AjPStr str
);

TypeNameRead/WriteDescription
const AjPStrstrInputCharacter set to test
char* RETURNFilter array set to 1 for each ascii value accepted zero for any character not in the set.

From EMBOSS 6.6.0


AjPStr: element retrieval

Functions for returning elements of a string object.

Functions:
ajStrGetAsciiCommonReturns the most common ASCII character code in a string.
ajStrGetAsciiHighReturns the highest ASCII character code in a string.
ajStrGetAsciiLowReturns the lowest ASCII character code in a string.
ajStrGetCharFirstReturns the first character from a string.
ajStrGetCharLastReturns the last character from a string.
ajStrGetCharPosReturns a single character at a given position from a string.
ajStrGetLenReturns the current length of the C (char *) string.
MAJSTRGETLEN
ajStrGetPtrReturns the current pointer to C (char *) string.
MAJSTRGETPTR
ajStrGetResReturns the current reserved size of the C (char *) string.
MAJSTRGETRES
ajStrGetRoomReturns the additional space available in a string before it would require reallocating.
ajStrGetUseReturns the current usage count of the C (char *) string.
MAJSTRGETUSE
ajStrGetValidChecks a string object for consistency.


Function ajStrGetAsciiCommon

Returns the most common ASCII character code in a string.

Prototype

char ajStrGetAsciiCommon (
      const AjPStr str
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
char RETURNMost common character or null character if empty.

From EMBOSS 6.1.0


Function ajStrGetAsciiHigh

Returns the highest ASCII character code in a string.

Prototype

char ajStrGetAsciiHigh (
      const AjPStr str
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
char RETURNHighest character or null character if empty.

From EMBOSS 6.1.0


Function ajStrGetAsciiLow

Returns the lowest ASCII character code in a string.

Prototype

char ajStrGetAsciiLow (
      const AjPStr str
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
char RETURNLowest character or null character if empty.

From EMBOSS 6.1.0


Function ajStrGetCharFirst

Returns the first character from a string.

Prototype

char ajStrGetCharFirst (
      const AjPStr str
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
char RETURNFirst character or null character if empty.

From EMBOSS 4.0.0


Function ajStrGetCharLast

Returns the last character from a string.

Prototype

char ajStrGetCharLast (
      const AjPStr str
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
char RETURNLast character or null character if empty.

From EMBOSS 4.0.0


Function ajStrGetCharPos

Returns a single character at a given position from a string.

Prototype

char ajStrGetCharPos (
      const AjPStr str,
      ajlong pos
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
ajlongposInputPosition in the string, negative values are from the end of the string.
char RETURNCharacter at position pos or null character if out of range.

From EMBOSS 4.0.0


Function ajStrGetLen

Returns the current length of the C (char *) string.

Prototype

size_t ajStrGetLen (
      const AjPStr str
);

TypeNameRead/WriteDescription
const AjPStrstrInputSource string
size_t RETURNCurrent string length

From EMBOSS 4.0.0


Macro MAJSTRGETLEN

Returns the current length of the C (char *) string.A macro version of {ajStrGetLen} available in case it is needed for speed. In release 6.5.0

Function ajStrGetPtr

Returns the current pointer to C (char *) string.

Prototype

const char* ajStrGetPtr (
      const AjPStr str
);

TypeNameRead/WriteDescription
const AjPStrstrInputSource string
const char* RETURNCurrent string pointer, or a null string if undefined.

From EMBOSS 4.0.0


Macro MAJSTRGETPTR

Returns the current pointer to C (char *) string.A macro version of {ajStrGetPtr} available in case it is needed for speed. In release 6.5.0

Function ajStrGetRes

Returns the current reserved size of the C (char *) string.

Prototype

size_t ajStrGetRes (
      const AjPStr str
);

TypeNameRead/WriteDescription
const AjPStrstrInputSource string
size_t RETURNCurrent string reserved size

From EMBOSS 4.0.0


Macro MAJSTRGETRES

Returns the current reserved size of the C (char *) string.A macro version of {ajStrGetRes} available in case it is needed for speed. In release 6.5.0

Function ajStrGetRoom

Returns the additional space available in a string before it would require reallocating.

Prototype

size_t ajStrGetRoom (
      const AjPStr str
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
size_t RETURNSpace available for additional characters.

From EMBOSS 4.0.0


Function ajStrGetUse

Returns the current usage count of the C (char *) string.

Prototype

ajuint ajStrGetUse (
      const AjPStr str
);

TypeNameRead/WriteDescription
const AjPStrstrInputSource string
ajuint RETURNCurrent string usage count

From EMBOSS 4.0.0


Macro MAJSTRGETUSE

Returns the current usage count of the C (char *) string.A macro version of {ajStrGetUse} available in case it is needed for speed. In release 6.5.0

Function ajStrGetValid

Checks a string object for consistency.

Prototype

AjBool ajStrGetValid (
      const AjPStr str
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
AjBool RETURNajTrue if no errors were found.

From EMBOSS 4.0.0


AjPStr: modifiable string retrieval

Functions for returning elements of a string object.

Functions:
ajStrGetuniquePtrMakes the string value unique by copying any string with a reference count of more than 1, and returns the current C (char *) pointer.
MAJSTRGETUNIQUESTR
ajStrGetuniqueStrMake certain a string is modifiable by checking it has no other references, or by making a new real copy of the string.


Function ajStrGetuniquePtr

Makes the string value unique by copying any string with a reference count of more than 1, and returns the current C (char *) pointer.

Prototype

char* ajStrGetuniquePtr (
      AjPStr* Pstr
);

TypeNameRead/WriteDescription
AjPStr*PstrModifySource string
char* RETURNCurrent string pointer, or a null string if undefined.

From EMBOSS 4.0.0


Macro MAJSTRGETUNIQUESTR

Make certain a string is modifiable by checking it has no other references, or by making a new real copy of the string.A macro version of {ajStrGetuniqueStr} in case it is needed for speed In release 6.5.0

Function ajStrGetuniqueStr

Make certain a string is modifiable by checking it has no other references, or by making a new real copy of the string.

Prototype

AjPStr ajStrGetuniqueStr (
      AjPStr* Pstr
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyString
AjPStr RETURNThe new string pointer, or NULL for failure

From EMBOSS 4.0.0


AjPStr: element assignment

Functions for assigning elements of a string object.

Functions:
ajStrSetClearClears all elements in a string object.
ajStrSetResEnsures a string is modifiable and big enough for its intended purpose.
ajStrSetResRoundEnsures a string is modifiable and big enough for its intended purpose.
ajStrSetValidReset string length when some nasty caller may have edited it
ajStrSetValidLenReset string length when some nasty caller may have edited it


Function ajStrSetClear

Clears all elements in a string object.

Prototype

AjBool ajStrSetClear (
      AjPStr* Pstr
);

TypeNameRead/WriteDescription
AjPStr*PstrOutputPointer to the string to be deleted. The pointer is always deleted.
AjBool RETURNajTrue if string was reallocated

From EMBOSS 4.0.0


Function ajStrSetRes

Ensures a string is modifiable and big enough for its intended purpose.

Prototype

AjBool ajStrSetRes (
      AjPStr* Pstr,
      size_t size
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyString
size_tsizeInputMinimum reserved size.
AjBool RETURNajTrue if the string was reallocated

From EMBOSS 4.0.0


Function ajStrSetResRound

Ensures a string is modifiable and big enough for its intended purpose.

Prototype

AjBool ajStrSetResRound (
      AjPStr* Pstr,
      size_t size
);

TypeNameRead/WriteDescription
AjPStr*PstrOutputString
size_tsizeInputMinimum reserved size.
AjBool RETURNajTrue if the string was reallocated

From EMBOSS 4.0.0


Function ajStrSetValid

Reset string length when some nasty caller may have edited it

Prototype

AjBool ajStrSetValid (
      AjPStr* Pstr
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyString.
AjBool RETURNTrue on success.

From EMBOSS 4.0.0


Function ajStrSetValidLen

Reset string length when some nasty caller may have edited it

Prototype

AjBool ajStrSetValidLen (
      AjPStr* Pstr,
      size_t len
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyString
size_tlenInputLength expected.
AjBool RETURNTrue on success

From EMBOSS 4.0.0


AjPStr: string to datatype conversion functions

Functions for converting strings to other datatypes.

Functions:
ajStrToBoolConverts a string into a Boolean value.
ajStrToDoubleConverts a string into a double precision value.
ajStrToFloatConverts a string into a floating point value.
ajStrToHexConverts a string from hexadecimal into an integer value.
ajStrToIntConverts a string into an integer value.
ajStrToLongConverts a string into an integer value.
ajStrToUintConverts a string into an unsigned integer value.
ajStrToUlongConverts a string into an unsigned long integer value.


Function ajStrToBool

Converts a string into a Boolean value.

Prototype

AjBool ajStrToBool (
      const AjPStr str,
      AjBool* Pval
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
AjBool*PvalOutputajTrue if the string is "true" as a boolean.
AjBool RETURNajTrue if the string had a valid boolean value.

From EMBOSS 1.0.0


Function ajStrToDouble

Converts a string into a double precision value.

Prototype

AjBool ajStrToDouble (
      const AjPStr str,
      double* Pval
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
double*PvalOutputString represented as a double precision number.
AjBool RETURNajTrue if the string had a valid double precision value.

From EMBOSS 1.0.0


Function ajStrToFloat

Converts a string into a floating point value.

Prototype

AjBool ajStrToFloat (
      const AjPStr str,
      float* Pval
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
float*PvalOutputString represented as a floating point number.
AjBool RETURNajTrue if the string had a valid floating point value.

From EMBOSS 1.0.0


Function ajStrToHex

Converts a string from hexadecimal into an integer value.

Prototype

AjBool ajStrToHex (
      const AjPStr str,
      ajint* Pval
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
ajint*PvalOutputString represented as an integer.
AjBool RETURNajTrue if the string had a valid hexadecimal value.

From EMBOSS 1.13.0


Function ajStrToInt

Converts a string into an integer value.

Prototype

AjBool ajStrToInt (
      const AjPStr str,
      ajint* Pval
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
ajint*PvalOutputString represented as an integer.
AjBool RETURNajTrue if the string had a valid integer value.

From EMBOSS 1.0.0


Function ajStrToLong

Converts a string into an integer value.

Prototype

AjBool ajStrToLong (
      const AjPStr str,
      ajlong* Pval
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
ajlong*PvalOutputString represented as an integer.
AjBool RETURNajTrue if the string had a valid integer value.

From EMBOSS 1.0.0


Function ajStrToUint

Converts a string into an unsigned integer value.

Prototype

AjBool ajStrToUint (
      const AjPStr str,
      ajuint* Pval
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
ajuint*PvalOutputString represented as an unsigned integer.
AjBool RETURNajTrue if the string had a valid unsigned integer value.

From EMBOSS 4.1.0


Function ajStrToUlong

Converts a string into an unsigned long integer value.

Prototype

AjBool ajStrToUlong (
      const AjPStr str,
      ajulong* Pval
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
ajulong*PvalOutputString represented as an integer.
AjBool RETURNajTrue if the string had a valid integer value.

From EMBOSS 6.3.0


AjPStr: datatype to string conversion functions

Functions for converting datatypes to strings.

Functions:
ajStrFromBoolConverts a Boolean value into a 1-letter string.
ajStrFromDoubleConverts a double precision value into a string.
ajStrFromDoubleExpConverts a double precision value into a string.
ajStrFromFloatConverts a floating point value into a string.
ajStrFromIntConverts an integer value into a string.
ajStrFromLongConverts an ajlong integer value into a string.
ajStrFromUintConverts an unsigned integer value into a string.
ajStrFromVoidTests a void pointer and if it is potentially an ASCII string saves it as the output string.


Function ajStrFromBool

Converts a Boolean value into a 1-letter string.

Prototype

AjBool ajStrFromBool (
      AjPStr* Pstr,
      AjBool val
);

TypeNameRead/WriteDescription
AjPStr*PstrOutputString to hold the result.
AjBoolvalInputBoolean value
AjBool RETURNajTrue if string was reallocated

From EMBOSS 1.0.0


Function ajStrFromDouble

Converts a double precision value into a string.

Prototype

AjBool ajStrFromDouble (
      AjPStr* Pstr,
      double val,
      ajint precision
);

TypeNameRead/WriteDescription
AjPStr*PstrOutputTarget string
doublevalInputDouble precision value
ajintprecisionInputPrecision (number of decimal places) to use.
AjBool RETURNajTrue if string was reallocated

From EMBOSS 1.0.0


Function ajStrFromDoubleExp

Converts a double precision value into a string.

Prototype

AjBool ajStrFromDoubleExp (
      AjPStr* Pstr,
      double val,
      ajint precision
);

TypeNameRead/WriteDescription
AjPStr*PstrOutputTarget string
doublevalInputDouble precision value
ajintprecisionInputPrecision (number of decimal places) to use.
AjBool RETURNajTrue if string was reallocated

From EMBOSS 4.0.0


Function ajStrFromFloat

Converts a floating point value into a string.

Prototype

AjBool ajStrFromFloat (
      AjPStr* Pstr,
      float val,
      ajint precision
);

TypeNameRead/WriteDescription
AjPStr*PstrOutputTarget string
floatvalInputFloating point value
ajintprecisionInputPrecision (number of decimal places) to use.
AjBool RETURNajTrue if string was reallocated

From EMBOSS 1.0.0


Function ajStrFromInt

Converts an integer value into a string.

Prototype

AjBool ajStrFromInt (
      AjPStr* Pstr,
      ajint val
);

TypeNameRead/WriteDescription
AjPStr*PstrOutputTarget string
ajintvalInputInteger value
AjBool RETURNajTrue if string was reallocated

From EMBOSS 1.0.0


Function ajStrFromLong

Converts an ajlong integer value into a string.

Prototype

AjBool ajStrFromLong (
      AjPStr* Pstr,
      ajlong val
);

TypeNameRead/WriteDescription
AjPStr*PstrOutputTarget string
ajlongvalInputLong integer value
AjBool RETURNajTrue if string was reallocated

From EMBOSS 1.0.0


Function ajStrFromUint

Converts an unsigned integer value into a string.

Prototype

AjBool ajStrFromUint (
      AjPStr* Pstr,
      ajuint val
);

TypeNameRead/WriteDescription
AjPStr*PstrOutputTarget string
ajuintvalInputInteger value
AjBool RETURNajTrue if string was reallocated

From EMBOSS 4.1.0


Function ajStrFromVoid

Tests a void pointer and if it is potentially an ASCII string saves it as the output string.

Prototype

AjBool ajStrFromVoid (
      AjPStr* Pstr,
      const void* vval
);

TypeNameRead/WriteDescription
AjPStr*PstrOutputTarget string
const void*vvalInputInteger value
AjBool RETURNajTrue if string was found

From EMBOSS 6.4.0


AjPStr: formatting

Functions for formatting strings.

Functions:
ajStrFmtBlockSplits a string into words (blocks) of a given size by inserting spaces.
ajStrFmtCapitalConverts the first character of each word in a string to upper case.
ajStrFmtLowerConverts a string to lower case.
ajStrFmtLowerSubConverts a substring of a string to lower case.
ajStrFmtPercentDecodeConverts percent-encoded characters
ajStrFmtPercentEncodeCPercent-encoded specified characters
ajStrFmtPercentEncodeSPercent-encoded specified characters
ajStrFmtQueryEnsures a string is a standard EMBOSS query term with all alphabetic characters in lower case, and any non alphanumeric characters replaced by an underscore
ajStrFmtQuoteEnsures a string is quoted with double quotes.
ajStrFmtTitleConverts the first character of a string to upper case.
ajStrFmtUpperConverts a string to upper case.
ajStrFmtUpperSubConverts a substring of a string to upper case.
ajStrFmtWordConverts a string to a single word. Spaces are converted to underscores. Leading substrings ending in a colon are removed.
ajStrFmtWrapFormats a string so that it wraps when printed.
ajStrFmtWrapAtFormats a string so that it wraps when printed. Breaks are at a preferred character (for example ',' for author lists)
ajStrFmtWrapLeftFormats a string so that it wraps and has a margin of space characters and an additional indent when printed.


Function ajStrFmtBlock

Splits a string into words (blocks) of a given size by inserting spaces.

Prototype

AjBool ajStrFmtBlock (
      AjPStr* Pstr,
      ajulong len
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyString.
ajulonglenInputBlock size
AjBool RETURNajTrue on success

From EMBOSS 4.0.0


Function ajStrFmtCapital

Converts the first character of each word in a string to upper case.

Prototype

AjBool ajStrFmtCapital (
      AjPStr* Pstr
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyString
AjBool RETURNajTrue if string was reallocated

From EMBOSS 6.6.0


Function ajStrFmtLower

Converts a string to lower case.

Prototype

AjBool ajStrFmtLower (
      AjPStr* Pstr
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyString
AjBool RETURNajTrue if string was reallocated

From EMBOSS 4.0.0


Function ajStrFmtLowerSub

Converts a substring of a string to lower case.

Prototype

AjBool ajStrFmtLowerSub (
      AjPStr* Pstr,
      ajlong pos1,
      ajlong pos2
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyString
ajlongpos1Inputstart position for conversion
ajlongpos2Inputend position for conversion
AjBool RETURNajTrue if string was reallocated

From EMBOSS 4.0.0


Function ajStrFmtPercentDecode

Converts percent-encoded characters

Prototype

AjBool ajStrFmtPercentDecode (
      AjPStr* Pstr
);

TypeNameRead/WriteDescription
AjPStr*PstrModifystring
AjBool RETURNTrue if string is not empty.

From EMBOSS 6.4.0


Function ajStrFmtPercentEncodeC

Percent-encoded specified characters

Prototype

AjBool ajStrFmtPercentEncodeC (
      AjPStr* Pstr,
      const char* txt
);

TypeNameRead/WriteDescription
AjPStr*PstrModifystring
const char*txtInputCharacters to encode
AjBool RETURNTrue if string is not empty.

From EMBOSS 6.4.0


Function ajStrFmtPercentEncodeS

Percent-encoded specified characters

Prototype

AjBool ajStrFmtPercentEncodeS (
      AjPStr* Pstr,
      const AjPStr str
);

TypeNameRead/WriteDescription
AjPStr*PstrModifystring
const AjPStrstrInputCharacters to encode
AjBool RETURNTrue if string is not empty.

From EMBOSS 6.4.0


Function ajStrFmtQuery

Ensures a string is a standard EMBOSS query term with all alphabetic characters in lower case, and any non alphanumeric characters replaced by an underscore

Prototype

AjBool ajStrFmtQuery (
      AjPStr* Pstr
);

TypeNameRead/WriteDescription
AjPStr*PstrModifystring
AjBool RETURNTrue if string is not empty.

From EMBOSS 6.4.0


Function ajStrFmtQuote

Ensures a string is quoted with double quotes.

Prototype

AjBool ajStrFmtQuote (
      AjPStr* Pstr
);

TypeNameRead/WriteDescription
AjPStr*PstrModifystring
AjBool RETURNTrue if string is not empty. As it is at least quoted, it will always return true.

From EMBOSS 4.0.0


Function ajStrFmtTitle

Converts the first character of a string to upper case.

Prototype

AjBool ajStrFmtTitle (
      AjPStr* Pstr
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyString
AjBool RETURNajTrue if string was reallocated

From EMBOSS 4.0.0


Function ajStrFmtUpper

Converts a string to upper case.

Prototype

AjBool ajStrFmtUpper (
      AjPStr* Pstr
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyString
AjBool RETURNajTrue if string was reallocated

From EMBOSS 4.0.0


Function ajStrFmtUpperSub

Converts a substring of a string to upper case.

Prototype

AjBool ajStrFmtUpperSub (
      AjPStr* Pstr,
      ajlong pos1,
      ajlong pos2
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyString
ajlongpos1Inputstart position for conversion
ajlongpos2Inputend position for conversion
AjBool RETURNajTrue if string was reallocated

From EMBOSS 4.0.0


Function ajStrFmtWord

Converts a string to a single word. Spaces are converted to underscores. Leading substrings ending in a colon are removed.

Prototype

AjBool ajStrFmtWord (
      AjPStr* Pstr
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyString
AjBool RETURNajTrue on success

From EMBOSS 6.4.0


Function ajStrFmtWrap

Formats a string so that it wraps when printed.

Prototype

AjBool ajStrFmtWrap (
      AjPStr* Pstr,
      ajuint width
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyTarget string
ajuintwidthInputLine width
AjBool RETURNajTrue on successful completion else ajFalse;

From EMBOSS 4.0.0


Function ajStrFmtWrapAt

Formats a string so that it wraps when printed. Breaks are at a preferred character (for example ',' for author lists)

Prototype

AjBool ajStrFmtWrapAt (
      AjPStr* Pstr,
      ajuint width,
      char ch
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyTarget string
ajuintwidthInputLine width
charchInputPreferred last character on line
AjBool RETURNajTrue on successful completion else ajFalse;

From EMBOSS 5.0.0


Function ajStrFmtWrapLeft

Formats a string so that it wraps and has a margin of space characters and an additional indent when printed.

Prototype

AjBool ajStrFmtWrapLeft (
      AjPStr* Pstr,
      ajuint width,
      ajuint margin,
      ajuint indent
);

TypeNameRead/WriteDescription
AjPStr*PstrModifyTarget string
ajuintwidthInputLine width
ajuintmarginInputLeft margin
ajuintindentInputLeft indentation on later lines
AjBool RETURNajTrue on successful completion else ajFalse;

From EMBOSS 4.0.0


AjPStr: comparison

Functions for comparing strings

Functions:
ajStrMatchCSimple test for matching a string and a text string.
ajStrMatchSSimple test for matching two strings.
ajStrMatchCaseCSimple case-insensitive test for matching a string and a text string.
ajStrMatchCaseSSimple case-insensitive test for matching two strings.
ajStrMatchWildCSimple case-sensitive test for matching a string and a text string using wildcard characters.
ajStrMatchWildSSimple case-sensitive test for matching two strings using wildcard characters.
ajStrMatchWildCaseCSimple case-insensitive test for matching a string and a text string using wildcard characters.
ajStrMatchWildCaseSSimple case-insensitive test for matching two strings using wildcard characters.
ajStrMatchWildWordCCase-sensitive test for matching a text string "word" against a string using wildcard characters.
ajStrMatchWildWordSCase-sensitive test for matching a string "word" against a string using wildcard characters.
ajStrMatchWildWordCaseCCase-insensitive test for matching a text string "word" against a string using wildcard characters.
ajStrMatchWildWordCaseSCase-insensitive test for matching a string "word" against a string using wildcard characters.
ajStrMatchWordAllSTest for matching all words within a string. Matches can be to parts of words in the original string.
ajStrMatchWordOneSTest for matching a word within a string. Matches can be to parts of words in the original string.
ajStrPrefixCTest for matching the start of a string against a given prefix text string.
ajStrPrefixSTest for matching the start of a string against a given prefix string.
ajStrPrefixCaseCCase-insensitive test for matching the start of a string against a given prefix text string.
ajStrPrefixCaseSCase-insensitive test for matching the start of a string against a given prefix string.
ajStrSuffixCTest for matching the end of a string against a given suffix text string.
ajStrSuffixSTest for matching the end of a string against a given suffix string.
ajStrSuffixCaseCCase-insensitive test for matching the end of a string against a given suffix text string.
ajStrSuffixCaseSCase-insensitive test for matching the end of a string against a given suffix string.


Function ajStrMatchC

Simple test for matching a string and a text string.

Prototype

AjBool ajStrMatchC (
      const AjPStr str,
      const char* txt2
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
const char*txt2InputText
AjBool RETURNajTrue if two complete strings are the same

From EMBOSS 1.0.0


Function ajStrMatchS

Simple test for matching two strings.

Prototype

AjBool ajStrMatchS (
      const AjPStr str,
      const AjPStr str2
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
const AjPStrstr2InputSecond String
AjBool RETURNajTrue if two complete strings are the same

From EMBOSS 4.0.0


Function ajStrMatchCaseC

Simple case-insensitive test for matching a string and a text string.

Prototype

AjBool ajStrMatchCaseC (
      const AjPStr str,
      const char* txt2
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
const char*txt2InputText
AjBool RETURNajTrue if two strings are exactly the same excluding case

From EMBOSS 1.0.0


Function ajStrMatchCaseS

Simple case-insensitive test for matching two strings.

Prototype

AjBool ajStrMatchCaseS (
      const AjPStr str,
      const AjPStr str2
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
const AjPStrstr2InputSecond String
AjBool RETURNajTrue if two strings are exactly the same excluding case

From EMBOSS 4.0.0


Function ajStrMatchWildC

Simple case-sensitive test for matching a string and a text string using wildcard characters.

Prototype

AjBool ajStrMatchWildC (
      const AjPStr str,
      const char* txt2
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
const char*txt2InputWildcard text
AjBool RETURNajTrue if the strings match

From EMBOSS 1.0.0


Function ajStrMatchWildS

Simple case-sensitive test for matching two strings using wildcard characters.

Prototype

AjBool ajStrMatchWildS (
      const AjPStr str,
      const AjPStr str2
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
const AjPStrstr2InputWildcard string
AjBool RETURNajTrue if two strings match

From EMBOSS 4.0.0


Function ajStrMatchWildCaseC

Simple case-insensitive test for matching a string and a text string using wildcard characters.

Prototype

AjBool ajStrMatchWildCaseC (
      const AjPStr str,
      const char* txt2
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
const char*txt2InputWildcard text
AjBool RETURNajTrue if the strings match

From EMBOSS 4.1.0


Function ajStrMatchWildCaseS

Simple case-insensitive test for matching two strings using wildcard characters.

Prototype

AjBool ajStrMatchWildCaseS (
      const AjPStr str,
      const AjPStr str2
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
const AjPStrstr2InputWildcard string
AjBool RETURNajTrue if two strings match

From EMBOSS 4.1.0


Function ajStrMatchWildWordC

Case-sensitive test for matching a text string "word" against a string using wildcard characters.

Prototype

AjBool ajStrMatchWildWordC (
      const AjPStr str,
      const char* txt2
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
const char*txt2InputText
AjBool RETURNajTrue if found

From EMBOSS 4.0.0


Function ajStrMatchWildWordS

Case-sensitive test for matching a string "word" against a string using wildcard characters.

Prototype

AjBool ajStrMatchWildWordS (
      const AjPStr str,
      const AjPStr str2
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
const AjPStrstr2InputText
AjBool RETURNajTrue if found

From EMBOSS 4.0.0


Function ajStrMatchWildWordCaseC

Case-insensitive test for matching a text string "word" against a string using wildcard characters.

Prototype

AjBool ajStrMatchWildWordCaseC (
      const AjPStr str,
      const char* txt2
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
const char*txt2InputText
AjBool RETURNajTrue if found

From EMBOSS 4.1.0


Function ajStrMatchWildWordCaseS

Case-insensitive test for matching a string "word" against a string using wildcard characters.

Prototype

AjBool ajStrMatchWildWordCaseS (
      const AjPStr str,
      const AjPStr str2
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
const AjPStrstr2InputText
AjBool RETURNajTrue if found

From EMBOSS 4.1.0


Function ajStrMatchWordAllS

Test for matching all words within a string. Matches can be to parts of words in the original string.

Prototype

AjBool ajStrMatchWordAllS (
      const AjPStr str,
      const AjPStr str2
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
const AjPStrstr2InputText
AjBool RETURNajTrue if found

From EMBOSS 4.0.0


Function ajStrMatchWordOneS

Test for matching a word within a string. Matches can be to parts of words in the original string.

Prototype

AjBool ajStrMatchWordOneS (
      const AjPStr str,
      const AjPStr str2
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
const AjPStrstr2InputText
AjBool RETURNajTrue if found

From EMBOSS 4.0.0


Function ajStrPrefixC

Test for matching the start of a string against a given prefix text string.

Prototype

AjBool ajStrPrefixC (
      const AjPStr str,
      const char* txt2
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
const char*txt2InputPrefix as text
AjBool RETURNajTrue if the string begins with the prefix

From EMBOSS 1.0.0


Function ajStrPrefixS

Test for matching the start of a string against a given prefix string.

Prototype

AjBool ajStrPrefixS (
      const AjPStr str,
      const AjPStr str2
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
const AjPStrstr2InputPrefix
AjBool RETURNajTrue if the string begins with the prefix

From EMBOSS 4.0.0


Function ajStrPrefixCaseC

Case-insensitive test for matching the start of a string against a given prefix text string.

Prototype

AjBool ajStrPrefixCaseC (
      const AjPStr str,
      const char* txt2
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
const char*txt2InputPrefix
AjBool RETURNajTrue if the string begins with the prefix

From EMBOSS 1.0.0


Function ajStrPrefixCaseS

Case-insensitive test for matching the start of a string against a given prefix string.

Prototype

AjBool ajStrPrefixCaseS (
      const AjPStr str,
      const AjPStr str2
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
const AjPStrstr2InputPrefix
AjBool RETURNajTrue if the string begins with the prefix

From EMBOSS 4.0.0


Function ajStrSuffixC

Test for matching the end of a string against a given suffix text string.

Prototype

AjBool ajStrSuffixC (
      const AjPStr str,
      const char* txt2
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
const char*txt2InputSuffix as text
AjBool RETURNajTrue if the string ends with the suffix

From EMBOSS 1.0.0


Function ajStrSuffixS

Test for matching the end of a string against a given suffix string.

Prototype

AjBool ajStrSuffixS (
      const AjPStr str,
      const AjPStr str2
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
const AjPStrstr2InputSuffix
AjBool RETURNajTrue if the string ends with the suffix

From EMBOSS 4.0.0


Function ajStrSuffixCaseC

Case-insensitive test for matching the end of a string against a given suffix text string.

Prototype

AjBool ajStrSuffixCaseC (
      const AjPStr str,
      const char* txt2
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
const char*txt2InputPrefix
AjBool RETURNajTrue if the string ends with the suffix

From EMBOSS 4.0.0


Function ajStrSuffixCaseS

Case-insensitive test for matching the end of a string against a given suffix string.

Prototype

AjBool ajStrSuffixCaseS (
      const AjPStr str,
      const AjPStr str2
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
const AjPStrstr2InputPrefix
AjBool RETURNajTrue if the string ends with the suffix

From EMBOSS 4.0.0


AjPStr: comparison (sorting)

Functions for sorting strings.

Functions:
MAJSTRCMPC
ajStrCmpCFinds the sort order of a string and a text string.
ajStrCmpLenCFinds the sort order of a string and a text string comparing the first n characters only.
MAJSTRCMPS
ajStrCmpSFinds the sort order of two strings.
ajStrCmpCaseSFinds the sort order of two strings using a case-insensitive comparison.
ajStrCmpLenSFinds the sort order of two strings comparing the first n characters only.
ajStrCmpWildCFinds the sort-order (case insensitive) of string and a text string using wildcard characters.
ajStrCmpWildSFinds the sort-order (case insensitive) of two strings using wildcard characters.
ajStrCmpWildCaseCFinds the sort-order (case sensitive) of string and a text string using wildcard characters.
ajStrCmpWildCaseSFinds the sort-order (case sensitive) of two strings using wildcard characters.
ajStrVcmpFinds the sort order of two strings cast as void.


Macro MAJSTRCMPC

Finds the sort order of a string and a text string.A macro version of {ajStrCmpC} in case it is needed for speed In release 6.5.0

Function ajStrCmpC

Finds the sort order of a string and a text string.

Prototype

int ajStrCmpC (
      const AjPStr str,
      const char* txt2
);

TypeNameRead/WriteDescription
const AjPStrstrInputString object
const char*txt2InputText string
int RETURN-1 if first string should sort before second, +1 if the second string should sort first. 0 if they are identical in length and content.

From EMBOSS 1.0.0


Function ajStrCmpLenC

Finds the sort order of a string and a text string comparing the first n characters only.

Prototype

int ajStrCmpLenC (
      const AjPStr str,
      const char* txt2,
      size_t len
);

TypeNameRead/WriteDescription
const AjPStrstrInputString object
const char*txt2InputText string
size_tlenInputLength to compare
int RETURN-1 if first string should sort before second, +1 if the second string should sort first. 0 if they are identical in length and content.

From EMBOSS 4.0.0


Macro MAJSTRCMPS

Finds the sort order of two strings.A macro version of {ajStrCmpS} in case it is needed for speed In release 6.5.0

Function ajStrCmpS

Finds the sort order of two strings.

Prototype

int ajStrCmpS (
      const AjPStr str,
      const AjPStr str2
);

TypeNameRead/WriteDescription
const AjPStrstrInputFirst string
const AjPStrstr2InputSecond string
int RETURN-1 if first string should sort before second, +1 if the second string should sort first. 0 if they are identical in length and content.

From EMBOSS 4.0.0


Function ajStrCmpCaseS

Finds the sort order of two strings using a case-insensitive comparison.

Prototype

int ajStrCmpCaseS (
      const AjPStr str,
      const AjPStr str2
);

TypeNameRead/WriteDescription
const AjPStrstrInputtext string
const AjPStrstr2InputText string
int RETURN-1 if first string should sort before second, +1 if the second string should sort first. 0 if they are identical in length and content.

From EMBOSS 4.0.0


Function ajStrCmpLenS

Finds the sort order of two strings comparing the first n characters only.

Prototype

int ajStrCmpLenS (
      const AjPStr str,
      const AjPStr str2,
      size_t len
);

TypeNameRead/WriteDescription
const AjPStrstrInputString object
const AjPStrstr2InputSecond string object
size_tlenInputLength to compare
int RETURN-1 if first string should sort before second, +1 if the second string should sort first. 0 if they are identical in length and content.

From EMBOSS 4.0.0


Function ajStrCmpWildC

Finds the sort-order (case insensitive) of string and a text string using wildcard characters.

Prototype

int ajStrCmpWildC (
      const AjPStr str,
      const char* txt2
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
const char*txt2InputWildcard text
int RETURN-1 if first string should sort before second, +1 if the second string should sort first. 0 if they are identical in length and content.

From EMBOSS 1.0.0


Function ajStrCmpWildS

Finds the sort-order (case insensitive) of two strings using wildcard characters.

Prototype

int ajStrCmpWildS (
      const AjPStr str,
      const AjPStr str2
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
const AjPStrstr2InputWildcard string
int RETURN-1 if first string should sort before second, +1 if the second string should sort first. 0 if they are identical in length and content.

From EMBOSS 4.0.0


Function ajStrCmpWildCaseC

Finds the sort-order (case sensitive) of string and a text string using wildcard characters.

Prototype

int ajStrCmpWildCaseC (
      const AjPStr str,
      const char* txt2
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
const char*txt2InputWildcard text
int RETURN-1 if first string should sort before second, +1 if the second string should sort first. 0 if they are identical in length and content.

From EMBOSS 4.1.0


Function ajStrCmpWildCaseS

Finds the sort-order (case sensitive) of two strings using wildcard characters.

Prototype

int ajStrCmpWildCaseS (
      const AjPStr str,
      const AjPStr str2
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
const AjPStrstr2InputWildcard string
int RETURN-1 if first string should sort before second, +1 if the second string should sort first. 0 if they are identical in length and content.

From EMBOSS 4.1.0


Function ajStrVcmp

Finds the sort order of two strings cast as void.

Prototype

int ajStrVcmp (
      const void* str,
      const void* str2
);

TypeNameRead/WriteDescription
const void*strInputFirst string
const void*str2InputSecond string
int RETURN-1 if first string should sort before second, +1 if the second string should sort first. 0 if they are identical in length and content.

From EMBOSS 4.0.0


AjPStr: comparison (search) functions

Functions for finding substrings or characters in strings.

Functions:
ajStrFindCFinds the first occurrence in a string of a second (text) string.
ajStrFindKFinds the first occurrence in a string of a single character.
ajStrFindSFinds the first occurrence in a string of a second string.
ajStrFindAnyCFinds the first occurrence in a string of any character in a second (text) string.
ajStrFindAnyKFinds the first occurrence in a string of a specified character.
ajStrFindAnySFinds the first occurrence in a string of any character in a second string.
ajStrFindCaseCFinds the first occurrence in a string of a second (text) string using a case-insensitive search.
ajStrFindCaseSFinds the first occurrence in a string of a second string using a case-insensitive search.
ajStrFindNextCFinds the next occurrence in a string of a second (text) string.
ajStrFindNextKFinds the next occurrence in a string of a specified character.
ajStrFindNextSFinds the next occurrence in a string of any character in a second string.
ajStrFindRestCFinds the first occurrence in a string of any character not in a second (text) string.
ajStrFindRestSFinds the first occurrence in a string of any character not in a second (text) string.
ajStrFindRestCaseCFinds the first occurrence in a string of any character not in a second (text) string (case-insensitive).
ajStrFindRestCaseSFinds the first occurrence in a string of any character not in a second (text) string (case-insensitive).
ajStrFindlastCFinds the last occurrence in a string of a second (text) string.
ajStrFindlastKFinds the last occurrence in a string of a character.
ajStrFindlastSFinds the last occurrence in a string of a second (text) string.


Function ajStrFindC

Finds the first occurrence in a string of a second (text) string.

Prototype

ajlong ajStrFindC (
      const AjPStr str,
      const char* txt2
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
const char*txt2Inputtext to find
ajlong RETURNPosition of the start of text in string if found. Or -1 for text not found.

From EMBOSS 1.0.0


Function ajStrFindK

Finds the first occurrence in a string of a single character.

Prototype

ajlong ajStrFindK (
      const AjPStr str,
      char chr
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
charchrInputCharacter to find
ajlong RETURNPosition of the start of text in string if found. Or -1 for text not found.

From EMBOSS 1.0.0


Function ajStrFindS

Finds the first occurrence in a string of a second string.

Prototype

ajlong ajStrFindS (
      const AjPStr str,
      const AjPStr str2
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
const AjPStrstr2Inputtext to find
ajlong RETURNPosition of the start of text in string if found. Or -1 for text not found.

From EMBOSS 4.0.0


Function ajStrFindAnyC

Finds the first occurrence in a string of any character in a second (text) string.

Prototype

ajlong ajStrFindAnyC (
      const AjPStr str,
      const char* txt2
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
const char*txt2Inputtext to find
ajlong RETURNPosition of the start of text in string if found. Or -1 for text not found.

From EMBOSS 3.0.0


Function ajStrFindAnyK

Finds the first occurrence in a string of a specified character.

Prototype

ajlong ajStrFindAnyK (
      const AjPStr str,
      char chr
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
charchrInputcharacter to find
ajlong RETURNPosition of the start of text in string if found. Or -1 for text not found.

From EMBOSS 4.0.0


Function ajStrFindAnyS

Finds the first occurrence in a string of any character in a second string.

Prototype

ajlong ajStrFindAnyS (
      const AjPStr str,
      const AjPStr str2
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
const AjPStrstr2Inputtext to find
ajlong RETURNPosition of the start of text in string if found. Or -1 for text not found.

From EMBOSS 4.0.0


Function ajStrFindCaseC

Finds the first occurrence in a string of a second (text) string using a case-insensitive search.

Prototype

ajlong ajStrFindCaseC (
      const AjPStr str,
      const char* txt2
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
const char*txt2Inputtext to find
ajlong RETURNPosition of the start of text in string if found.

From EMBOSS 1.7.0


Function ajStrFindCaseS

Finds the first occurrence in a string of a second string using a case-insensitive search.

Prototype

ajlong ajStrFindCaseS (
      const AjPStr str,
      const AjPStr str2
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
const AjPStrstr2Inputtext to find
ajlong RETURNPosition of the start of text in string if found. -1 if not found.

From EMBOSS 4.0.0


Function ajStrFindNextC

Finds the next occurrence in a string of a second (text) string.

Prototype

ajlong ajStrFindNextC (
      const AjPStr str,
      ajlong pos1,
      const char* txt2
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
ajlongpos1InputStart position in string
const char*txt2Inputtext to find
ajlong RETURNPosition of the start of text in string if found. Or -1 for text not found.

From EMBOSS 6.0.0


Function ajStrFindNextK

Finds the next occurrence in a string of a specified character.

Prototype

ajlong ajStrFindNextK (
      const AjPStr str,
      ajlong pos1,
      char chr
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
ajlongpos1InputStart position in string
charchrInputcharacter to find
ajlong RETURNPosition of the start of text in string if found. Or -1 for text not found.

From EMBOSS 6.0.0


Function ajStrFindNextS

Finds the next occurrence in a string of any character in a second string.

Prototype

ajlong ajStrFindNextS (
      const AjPStr str,
      ajlong pos1,
      const AjPStr str2
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
ajlongpos1InputStart position in string
const AjPStrstr2Inputtext to find
ajlong RETURNPosition of the start of text in string if found. Or -1 for text not found.

From EMBOSS 6.0.0


Function ajStrFindRestC

Finds the first occurrence in a string of any character not in a second (text) string.

Prototype

ajlong ajStrFindRestC (
      const AjPStr str,
      const char* txt2
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
const char*txt2Inputtext to find
ajlong RETURNPosition of the start of text in string if found. Or -1 for text not found.

From EMBOSS 4.1.0


Function ajStrFindRestS

Finds the first occurrence in a string of any character not in a second (text) string.

Prototype

ajlong ajStrFindRestS (
      const AjPStr str,
      const AjPStr str2
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
const AjPStrstr2Inputtext to find
ajlong RETURNPosition of the start of text in string if found. Or -1 for text not found.

From EMBOSS 4.1.0


Function ajStrFindRestCaseC

Finds the first occurrence in a string of any character not in a second (text) string (case-insensitive).

Prototype

ajlong ajStrFindRestCaseC (
      const AjPStr str,
      const char* txt2
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
const char*txt2Inputtext to find
ajlong RETURNPosition of the start of text in string if found. Or -1 for text not found.

From EMBOSS 4.1.0


Function ajStrFindRestCaseS

Finds the first occurrence in a string of any character not in a second (text) string (case-insensitive).

Prototype

ajlong ajStrFindRestCaseS (
      const AjPStr str,
      const AjPStr str2
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
const AjPStrstr2Inputtext to find
ajlong RETURNPosition of the start of text in string if found. Or -1 for text not found.

From EMBOSS 4.1.0


Function ajStrFindlastC

Finds the last occurrence in a string of a second (text) string.

Prototype

ajlong ajStrFindlastC (
      const AjPStr str,
      const char* txt2
);

TypeNameRead/WriteDescription
const AjPStrstrInputString to search
const char*txt2Inputtext to look for
ajlong RETURNPosition of the text string if found.

From EMBOSS 4.0.0


Function ajStrFindlastK

Finds the last occurrence in a string of a character.

Prototype

ajlong ajStrFindlastK (
      const AjPStr str,
      char chr
);

TypeNameRead/WriteDescription
const AjPStrstrInputString to search
charchrInputCharacter to look for
ajlong RETURNPosition of the character if found.

From EMBOSS 6.1.0


Function ajStrFindlastS

Finds the last occurrence in a string of a second (text) string.

Prototype

ajlong ajStrFindlastS (
      const AjPStr str,
      const AjPStr str2
);

TypeNameRead/WriteDescription
const AjPStrstrInputString to search
const AjPStrstr2Inputtext to look for
ajlong RETURNPosition of the text string if found.

From EMBOSS 4.0.0


AjPStr: parsing functions

Functions for parsing tokens from strings.

Functions:
ajStrExtractFirstReturns a word from the start of a string, and the remainder of the string
ajStrExtractTokenReturns a word from the start of a string, and the remainder of the string. Leading spaces and punctuation (commas, semicolons) are ignored
ajStrExtractWordReturns a word from the start of a string, and the remainder of the string. Leading spaces are skipped.
ajStrParseCTokenise a string using a specified set of delimiters and return tokens from the string.
ajStrParseCountReturns the number of tokens in a string, delimited by whitespace
ajStrParseCountCReturns the number of tokens in a string using a specified set of delimiters held in a text string.
ajStrParseCountSReturns the number of tokens in a string using a specified set of delimiters held in a string.
ajStrParseCountMultiCReturns the number of tokens in a string.
ajStrParseSplitSplits a newline-separated multi-line string into an array of strings.
ajStrParseWhiteTokenise a string using whitespace and return tokens from the string.


Function ajStrExtractFirst

Returns a word from the start of a string, and the remainder of the string

Prototype

AjBool ajStrExtractFirst (
      const AjPStr str,
      AjPStr* Prest,
      AjPStr* Pword
);

TypeNameRead/WriteDescription
const AjPStrstrInputString to be parsed
AjPStr*PrestOutputRemainder of string
AjPStr*PwordOutputFirst word of string
AjBool RETURNTrue if parsing succeeded

From EMBOSS 4.0.0


Function ajStrExtractToken

Returns a word from the start of a string, and the remainder of the string. Leading spaces and punctuation (commas, semicolons) are ignored

Prototype

AjBool ajStrExtractToken (
      const AjPStr str,
      AjPStr* Prest,
      AjPStr* Pword
);

TypeNameRead/WriteDescription
const AjPStrstrInputString to be parsed
AjPStr*PrestOutputRemainder of string
AjPStr*PwordOutputFirst token of string
AjBool RETURNTrue if parsing succeeded

From EMBOSS 6.4.0


Function ajStrExtractWord

Returns a word from the start of a string, and the remainder of the string. Leading spaces are skipped.

Prototype

AjBool ajStrExtractWord (
      const AjPStr str,
      AjPStr* Prest,
      AjPStr* Pword
);

TypeNameRead/WriteDescription
const AjPStrstrInputString to be parsed
AjPStr*PrestOutputRemainder of string
AjPStr*PwordOutputFirst word of string
AjBool RETURNTrue if parsing succeeded

From EMBOSS 4.0.0


Function ajStrParseC

Tokenise a string using a specified set of delimiters and return tokens from the string.

Prototype

const AjPStr ajStrParseC (
      const AjPStr str,
      const char* txtdelim
);

TypeNameRead/WriteDescription
const AjPStrstrInputString to be parsed (first call) or NULL for follow-up calls using the same string, as for the C RTL function strtok which is eventually called.
const char*txtdelimInputDelimiter(s) to be used between tokens.
const AjPStr RETURNToken returned, when all tokens are parsed a NULL is returned.

From EMBOSS 4.0.0


Function ajStrParseCount

Returns the number of tokens in a string, delimited by whitespace

Prototype

ajuint ajStrParseCount (
      const AjPStr str
);

TypeNameRead/WriteDescription
const AjPStrstrInputString to examine.
ajuint RETURNThe number of tokens

From EMBOSS 4.0.0


Function ajStrParseCountC

Returns the number of tokens in a string using a specified set of delimiters held in a text string.

Prototype

ajuint ajStrParseCountC (
      const AjPStr str,
      const char* txtdelim
);

TypeNameRead/WriteDescription
const AjPStrstrInputString to examine.
const char*txtdelimInputString of delimiter characters.
ajuint RETURNThe number of tokens

From EMBOSS 4.0.0


Function ajStrParseCountS

Returns the number of tokens in a string using a specified set of delimiters held in a string.

Prototype

ajuint ajStrParseCountS (
      const AjPStr str,
      const AjPStr strdelim
);

TypeNameRead/WriteDescription
const AjPStrstrInputString to examine.
const AjPStrstrdelimInputString of delimiter characters.
ajuint RETURNThe number of tokens

From EMBOSS 4.0.0


Function ajStrParseCountMultiC

Returns the number of tokens in a string.

Prototype

ajuint ajStrParseCountMultiC (
      const AjPStr str,
      const char* txtdelim
);

TypeNameRead/WriteDescription
const AjPStrstrInputString to examine.
const char*txtdelimInputString of delimiter characters.
ajuint RETURNThe number of tokens

From EMBOSS 4.0.0


Function ajStrParseSplit

Splits a newline-separated multi-line string into an array of strings.

Prototype

ajuint ajStrParseSplit (
      const AjPStr str,
      AjPStr** PPstr
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
AjPStr**PPstrOutputpointer to array of AjPStrs
ajuint RETURNNumber of array elements created

From EMBOSS 4.0.0


Function ajStrParseWhite

Tokenise a string using whitespace and return tokens from the string.

Prototype

const AjPStr ajStrParseWhite (
      const AjPStr str
);

TypeNameRead/WriteDescription
const AjPStrstrInputString to be parsed (first call) or NULL for follow-up calls using the same string, as for the C RTL function strtok which is eventually called.
const AjPStr RETURNToken

From EMBOSS 4.0.0


AjPStr: debugging

Functions for reporting of a string object.

Functions:
ajStrProbeDefault string memory probe which checks the string object and the string it contains are valid memory
ajStrStatPrints a summary of string usage with debug calls.
ajStrTraceChecks a string object for consistency and reports its contents.
ajStrTraceFullChecks a string object for consistency and reports its contents character by character.
ajStrTraceTitleChecks a string object for consistency and reports its contents using a defined title for the report.


Function ajStrProbe

Default string memory probe which checks the string object and the string it contains are valid memory

Prototype

void ajStrProbe (
      AjPStr const* Pstr
);

TypeNameRead/WriteDescription
AjPStr const*PstrInputPointer to the string to be probed.
void RETURN

From EMBOSS 6.0.0


Function ajStrStat

Prints a summary of string usage with debug calls.

Prototype

void ajStrStat (
      const char* title
);

TypeNameRead/WriteDescription
const char*titleInputTitle for this summary
void RETURN

From EMBOSS 1.0.0


Function ajStrTrace

Checks a string object for consistency and reports its contents.

Prototype

void ajStrTrace (
      const AjPStr str
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
void RETURN

From EMBOSS 1.0.0


Function ajStrTraceFull

Checks a string object for consistency and reports its contents character by character.

Prototype

void ajStrTraceFull (
      const AjPStr str
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
void RETURN

From EMBOSS 4.0.0


Function ajStrTraceTitle

Checks a string object for consistency and reports its contents using a defined title for the report.

Prototype

void ajStrTraceTitle (
      const AjPStr str,
      const char* title
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
const char*titleInputReport title
void RETURN

From EMBOSS 4.0.0


AjPStr: exit

Functions called on exit from the program by ajExit to do any necessary cleanup and to report internal statistics to the debug file

Functions:
ajStrExitPrints a summary of string usage with debug calls.


Function ajStrExit

Prints a summary of string usage with debug calls.

Prototype

void ajStrExit (
      void
);

TypeNameRead/WriteDescription
void RETURN

From EMBOSS 1.0.0


Datatype: const AjPStr

Functions for manipulating AJAX (AjPStr) string constants

Sections:
string constant constructorsConstructors


const AjPStr: string constant constructors

Functions for constructing string constant objects

Functions:
ajStrConstSReturns an unmodifiable empty string.
ajStrConstEmptyReturns an unmodifiable empty string.


Function ajStrConstS

Returns an unmodifiable empty string.

Prototype

const AjPStr ajStrConstS (
      const AjPStr str
);

TypeNameRead/WriteDescription
const AjPStrstrInputString
const AjPStr RETURNPointer to an empty string

From EMBOSS 6.2.0


Function ajStrConstEmpty

Returns an unmodifiable empty string.

Prototype

const AjPStr ajStrConstEmpty (
      void
);

TypeNameRead/WriteDescription
const AjPStr RETURNPointer to an empty string

From EMBOSS 6.2.0


Datatype: AjIStr

String iterators point to successive characters in a string

Sections:
constructorsConstructors
destructorsDestructors
testsGeneral use
resetsModifiers
attributesCasts
modifiersModifiers
steppingModifiers


AjIStr: constructors

Functions:
ajStrIterNewString iterator constructor which allocates memory for a string iterator, used to iterate over the characters in a string.
ajStrIterNewBackString iterator constructor which allocates memory for a string iterator, used to iterate over the characters in a string, from end to start.


Function ajStrIterNew

String iterator constructor which allocates memory for a string iterator, used to iterate over the characters in a string.

Prototype

AjIStr ajStrIterNew (
      const AjPStr str
);

TypeNameRead/WriteDescription
const AjPStrstrInputOriginal string
AjIStr RETURNString Iterator

From EMBOSS 4.0.0


Function ajStrIterNewBack

String iterator constructor which allocates memory for a string iterator, used to iterate over the characters in a string, from end to start.

Prototype

AjIStr ajStrIterNewBack (
      const AjPStr str
);

TypeNameRead/WriteDescription
const AjPStrstrInputOriginal string
AjIStr RETURNString Iterator

From EMBOSS 4.0.0


AjIStr: destructors

Functions:
ajStrIterDelString iterator destructor which frees memory for a string iterator.


Function ajStrIterDel

String iterator destructor which frees memory for a string iterator.

Prototype

void ajStrIterDel (
      AjIStr* iter
);

TypeNameRead/WriteDescription
AjIStr*iterDeleteString iterator
void RETURN

From EMBOSS 4.0.0


AjIStr: tests

Functions:
ajStrIterDoneTests whether a string iterator has completed yet.
ajStrIterDoneBackTests whether a string iterator (from end to start) has completed yet.


Function ajStrIterDone

Tests whether a string iterator has completed yet.

Prototype

AjBool ajStrIterDone (
      const AjIStr iter
);

TypeNameRead/WriteDescription
const AjIStriterInputString iterator.
AjBool RETURNtrue if complete

From EMBOSS 4.0.0


Function ajStrIterDoneBack

Tests whether a string iterator (from end to start) has completed yet.

Prototype

AjBool ajStrIterDoneBack (
      const AjIStr iter
);

TypeNameRead/WriteDescription
const AjIStriterInputString iterator.
AjBool RETURNtrue if complete

From EMBOSS 4.0.0


AjIStr: resets

Functions:
ajStrIterBeginSets a string iterator to its start condition,
ajStrIterEndSets a string iterator to its stop condition.


Function ajStrIterBegin

Sets a string iterator to its start condition,

Prototype

void ajStrIterBegin (
      AjIStr iter
);

TypeNameRead/WriteDescription
AjIStriterModifyString iterator.
void RETURN

From EMBOSS 4.0.0


Function ajStrIterEnd

Sets a string iterator to its stop condition.

Prototype

void ajStrIterEnd (
      AjIStr iter
);

TypeNameRead/WriteDescription
AjIStriterModifyString iterator.
void RETURN

From EMBOSS 4.0.0


AjIStr: attributes

Functions:
ajStrIterGetCReturns the remainder of the string at the current string iterator position.
ajStrIterGetKReturns the value (character) at the current string iterator position.


Function ajStrIterGetC

Returns the remainder of the string at the current string iterator position.

Prototype

const char* ajStrIterGetC (
      const AjIStr iter
);

TypeNameRead/WriteDescription
const AjIStriterInputString iterator.
const char* RETURNCurrent text string within iterator

From EMBOSS 4.0.0


Function ajStrIterGetK

Returns the value (character) at the current string iterator position.

Prototype

char ajStrIterGetK (
      const AjIStr iter
);

TypeNameRead/WriteDescription
const AjIStriterInputString iterator.
char RETURNCurrent character within iterator

From EMBOSS 4.0.0


AjIStr: modifiers

Functions:
ajStrIterPutKReplaces the character at the current string iterator position.


Function ajStrIterPutK

Replaces the character at the current string iterator position.

Prototype

void ajStrIterPutK (
      AjIStr iter,
      char chr
);

TypeNameRead/WriteDescription
AjIStriterModifyString iterator.
charchrInputCharacter
void RETURN

From EMBOSS 4.0.0


AjIStr: stepping

Functions:
ajStrIterNextStep to next character in string iterator.
ajStrIterNextBackStep to previous character in string iterator.


Function ajStrIterNext

Step to next character in string iterator.

Prototype

AjIStr ajStrIterNext (
      AjIStr iter
);

TypeNameRead/WriteDescription
AjIStriterModifyString iterator.
AjIStr RETURNUpdated iterator duplicated as return value.

From EMBOSS 1.0.0


Function ajStrIterNextBack

Step to previous character in string iterator.

Prototype

AjIStr ajStrIterNextBack (
      AjIStr iter
);

TypeNameRead/WriteDescription
AjIStriterModifyString iterator.
AjIStr RETURNUpdated iterator duplicated as return value.

From EMBOSS 4.0.0


Datatype: AjPStrTok

Sections:
constructorsConstructors
destructorsDestructors
assignmentAssignments
resetModifiers
debuggingMiscellaneous
parsingModifiers


AjPStrTok: constructors

Functions:
ajStrTokenNewCString token parser constructor which allocates memory for a string token parser object from a string and a set of default delimiters defined in a text string.
ajStrTokenNewSString token parser constructor which allocates memory for a string token parser object from a string and an optional set of default delimiters defined in a text string.
ajStrTokenNewcharCString token parser constructor which allocates memory for a string token parser object from a string and a set of default delimiters defined in a text string.
ajStrTokenNewcharSString token parser constructor which allocates memory for a string token parser object from a string and an optional set of default delimiters defined in a text string.


Function ajStrTokenNewC

String token parser constructor which allocates memory for a string token parser object from a string and a set of default delimiters defined in a text string.

Prototype

AjPStrTok ajStrTokenNewC (
      const AjPStr str,
      const char* txtdelim
);

TypeNameRead/WriteDescription
const AjPStrstrInputSource string
const char*txtdelimInputDefault delimiter(s)
AjPStrTok RETURNA new string token parser.

From EMBOSS 4.0.0


Function ajStrTokenNewS

String token parser constructor which allocates memory for a string token parser object from a string and an optional set of default delimiters defined in a text string.

Prototype

AjPStrTok ajStrTokenNewS (
      const AjPStr str,
      const AjPStr strdelim
);

TypeNameRead/WriteDescription
const AjPStrstrInputSource string
const AjPStrstrdelimInputDefault delimiter(s)
AjPStrTok RETURNA new string token parser.

From EMBOSS 4.0.0


Function ajStrTokenNewcharC

String token parser constructor which allocates memory for a string token parser object from a string and a set of default delimiters defined in a text string.

Prototype

AjPStrTok ajStrTokenNewcharC (
      const char* txt,
      const char* txtdelim
);

TypeNameRead/WriteDescription
const char*txtInputSource string
const char*txtdelimInputDefault delimiter(s)
AjPStrTok RETURNA new string token parser.

From EMBOSS 6.4.0


Function ajStrTokenNewcharS

String token parser constructor which allocates memory for a string token parser object from a string and an optional set of default delimiters defined in a text string.

Prototype

AjPStrTok ajStrTokenNewcharS (
      const char* txt,
      const AjPStr strdelim
);

TypeNameRead/WriteDescription
const char*txtInputSource string
const AjPStrstrdelimInputDefault delimiter(s)
AjPStrTok RETURNA new string token parser.

From EMBOSS 6.4.0


AjPStrTok: destructors

Functions:
ajStrTokenDelString token parser destructor which frees memory for a string token parser.


Function ajStrTokenDel

String token parser destructor which frees memory for a string token parser.

Prototype

void ajStrTokenDel (
      AjPStrTok* Ptoken
);

TypeNameRead/WriteDescription
AjPStrTok*PtokenDeleteToken parser
void RETURN

From EMBOSS 4.0.0


AjPStrTok: assignment

Functions:
ajStrTokenAssignGenerates a string token parser object from a string without a specific set of delimiters.
ajStrTokenAssignCGenerates a string token parser object from a string and an optional set of default delimiters defined in a text string.
ajStrTokenAssignSGenerates a string token parser object from a string and an optional set of default delimiters defined in a string.
ajStrTokenAssigncharGenerates a string token parser object from a string without a specific set of delimiters.
ajStrTokenAssigncharCGenerates a string token parser object from a string and an optional set of default delimiters defined in a text string.
ajStrTokenAssigncharSGenerates a string token parser object from a string and an optional set of default delimiters defined in a string.


Function ajStrTokenAssign

Generates a string token parser object from a string without a specific set of delimiters.

Prototype

AjBool ajStrTokenAssign (
      AjPStrTok* Ptoken,
      const AjPStr str
);

TypeNameRead/WriteDescription
AjPStrTok*PtokenOutputString token object
const AjPStrstrInputSource string
AjBool RETURNajTrue on success.

From EMBOSS 4.0.0


Function ajStrTokenAssignC

Generates a string token parser object from a string and an optional set of default delimiters defined in a text string.

Prototype

AjBool ajStrTokenAssignC (
      AjPStrTok* Ptoken,
      const AjPStr str,
      const char* txtdelim
);

TypeNameRead/WriteDescription
AjPStrTok*PtokenOutputString token object
const AjPStrstrInputSource string
const char*txtdelimInputDefault delimiter(s)
AjBool RETURNajTrue on success.

From EMBOSS 4.0.0


Function ajStrTokenAssignS

Generates a string token parser object from a string and an optional set of default delimiters defined in a string.

Prototype

AjBool ajStrTokenAssignS (
      AjPStrTok* Ptoken,
      const AjPStr str,
      const AjPStr strdelim
);

TypeNameRead/WriteDescription
AjPStrTok*PtokenOutputString token object
const AjPStrstrInputSource string
const AjPStrstrdelimInputDefault delimiter(s)
AjBool RETURNajTrue on success.

From EMBOSS 4.0.0


Function ajStrTokenAssignchar

Generates a string token parser object from a string without a specific set of delimiters.

Prototype

AjBool ajStrTokenAssignchar (
      AjPStrTok* Ptoken,
      const char* txt
);

TypeNameRead/WriteDescription
AjPStrTok*PtokenOutputString token object
const char*txtInputSource string
AjBool RETURNajTrue on success.

From EMBOSS 4.0.0


Function ajStrTokenAssigncharC

Generates a string token parser object from a string and an optional set of default delimiters defined in a text string.

Prototype

AjBool ajStrTokenAssigncharC (
      AjPStrTok* Ptoken,
      const char* txt,
      const char* txtdelim
);

TypeNameRead/WriteDescription
AjPStrTok*PtokenOutputString token object
const char*txtInputSource string
const char*txtdelimInputDefault delimiter(s)
AjBool RETURNajTrue on success.

From EMBOSS 4.0.0


Function ajStrTokenAssigncharS

Generates a string token parser object from a string and an optional set of default delimiters defined in a string.

Prototype

AjBool ajStrTokenAssigncharS (
      AjPStrTok* Ptoken,
      const char* txt,
      const AjPStr strdelim
);

TypeNameRead/WriteDescription
AjPStrTok*PtokenOutputString token object
const char*txtInputSource string
const AjPStrstrdelimInputDefault delimiter(s)
AjBool RETURNajTrue on success.

From EMBOSS 4.0.0


AjPStrTok: reset

Functions:
ajStrTokenResetClears the strings from a string token parser object.


Function ajStrTokenReset

Clears the strings from a string token parser object.

Prototype

void ajStrTokenReset (
      AjPStrTok token
);

TypeNameRead/WriteDescription
AjPStrToktokenOutputString token object
void RETURN

From EMBOSS 6.6.0


AjPStrTok: debugging

Functions:
ajStrTokenTraceWrites a debug trace of a string token parser object.


Function ajStrTokenTrace

Writes a debug trace of a string token parser object.

Prototype

void ajStrTokenTrace (
      const AjPStrTok token
);

TypeNameRead/WriteDescription
const AjPStrToktokenInputString token object
void RETURN

From EMBOSS 1.0.0


AjPStrTok: parsing

Functions:
ajStrTokenNextFindParses tokens from a string using a string token parser. Treats the whole delimiter as a single string between tokens.
ajStrTokenNextFindCParses tokens from a string using a string token parser. Treats the whole delimiter as a single string between tokens.
ajStrTokenNextParseParses tokens from a string using a string token parser. Uses any character defined in the string token parsing object delimiter character set as a delimiter.
ajStrTokenNextParseCParses tokens from a string using a string token parser. Uses any character defined in the delimiter character set as a delimiter.
ajStrTokenNextParseSParses tokens from a string using a string token parser. Uses any character defined in the delimiter character set as a delimiter.
ajStrTokenNextParseDelimitersParses tokens from a string using a string token parser. Uses any character defined in the string token parsing object delimiter character set as a delimiter.
ajStrTokenNextParseNoskipParses tokens from a string using a string token parser. Uses any character defined in the string token parsing object's delimiter character set as a delimiter.
ajStrTokenRestParseReturns the remainder of a string that has been partially parsed using a string token parser.
ajStrTokenStepSteps to next token from a string using a string token parser. Uses any character defined in the string token parsing object delimiter character set as a delimiter.
ajStrTokenStepCSteps to next token from a string using a string token parser. Uses any character defined in the delimiter character set as a delimiter.
ajStrTokenStepSParses tokens from a string using a string token parser. Uses any character defined in the delimiter character set as a delimiter.


Function ajStrTokenNextFind

Parses tokens from a string using a string token parser. Treats the whole delimiter as a single string between tokens.

Prototype

AjBool ajStrTokenNextFind (
      AjPStrTok token,
      AjPStr* Pstr
);

TypeNameRead/WriteDescription
AjPStrToktokenModifyToken parser. Updated with the delimiter string (if any) in delim.
AjPStr*PstrOutputToken found
AjBool RETURNajTrue if another token was found.

From EMBOSS 4.0.0


Function ajStrTokenNextFindC

Parses tokens from a string using a string token parser. Treats the whole delimiter as a single string between tokens.

Prototype

AjBool ajStrTokenNextFindC (
      AjPStrTok token,
      const char* txtdelim,
      AjPStr* Pstr
);

TypeNameRead/WriteDescription
AjPStrToktokenModifyToken parser. Updated with the delimiter string in delim.
const char*txtdelimInputDelimiter string.
AjPStr*PstrOutputToken found
AjBool RETURNajTrue if another token was found.

From EMBOSS 4.0.0


Function ajStrTokenNextParse

Parses tokens from a string using a string token parser. Uses any character defined in the string token parsing object delimiter character set as a delimiter.

Prototype

AjBool ajStrTokenNextParse (
      AjPStrTok token,
      AjPStr* Pstr
);

TypeNameRead/WriteDescription
AjPStrToktokenModifyString token parsing object.
AjPStr*PstrOutputNext token returned, may be empty if the delimiter has changed.
AjBool RETURNTrue if successfully parsed. False (and string set to empty) if there is nothing more to parse.

From EMBOSS 4.0.0


Function ajStrTokenNextParseC

Parses tokens from a string using a string token parser. Uses any character defined in the delimiter character set as a delimiter.

Prototype

AjBool ajStrTokenNextParseC (
      AjPStrTok token,
      const char* txtdelim,
      AjPStr* Pstr
);

TypeNameRead/WriteDescription
AjPStrToktokenModifyString token parsing object.
const char*txtdelimInputDelimiter character set.
AjPStr*PstrOutputNext token returned, may be empty if the delimiter has changed.
AjBool RETURNTrue if successfully parsed. False (and string set to empty) if there is nothing more to parse.

From EMBOSS 4.0.0


Function ajStrTokenNextParseS

Parses tokens from a string using a string token parser. Uses any character defined in the delimiter character set as a delimiter.

Prototype

AjBool ajStrTokenNextParseS (
      AjPStrTok token,
      const AjPStr strdelim,
      AjPStr* Pstr
);

TypeNameRead/WriteDescription
AjPStrToktokenModifyString token parsing object.
const AjPStrstrdelimInputDelimiter character set.
AjPStr*PstrOutputNext token returned, may be empty if the delimiter has changed.
AjBool RETURNTrue if successfully parsed. False (and string set to empty) if there is nothing more to parse.

From EMBOSS 4.0.0


Function ajStrTokenNextParseDelimiters

Parses tokens from a string using a string token parser. Uses any character defined in the string token parsing object delimiter character set as a delimiter.

Prototype

AjBool ajStrTokenNextParseDelimiters (
      AjPStrTok token,
      AjPStr* Pstr,
      AjPStr* Pdelim
);

TypeNameRead/WriteDescription
AjPStrToktokenModifyString token parsing object.
AjPStr*PstrOutputNext token returned, may be empty if the delimiter has changed.
AjPStr*PdelimOutputDelimiter(s) following the token.
AjBool RETURNTrue if successfully parsed. False (and string set to empty) if there is nothing more to parse.

From EMBOSS 6.4.0


Function ajStrTokenNextParseNoskip

Parses tokens from a string using a string token parser. Uses any character defined in the string token parsing object's delimiter character set as a delimiter.

Prototype

AjBool ajStrTokenNextParseNoskip (
      AjPStrTok token,
      AjPStr* Pstr
);

TypeNameRead/WriteDescription
AjPStrToktokenModifyString token parsing object.
AjPStr*PstrOutputNext token returned, may be empty if the delimiter has changed or if next character was also a delimiter
AjBool RETURNTrue if successfully parsed. False (and string set to empty) if there is nothing more to parse.

From EMBOSS 6.2.0


Function ajStrTokenRestParse

Returns the remainder of a string that has been partially parsed using a string token parser.

Prototype

AjBool ajStrTokenRestParse (
      AjPStrTok token,
      AjPStr* Pstr
);

TypeNameRead/WriteDescription
AjPStrToktokenModifyString token parsing object.
AjPStr*PstrOutputRemainder of string
AjBool RETURNTrue if successfully parsed. False (and string set to empty) if there is nothing more to parse.

From EMBOSS 4.0.0


Function ajStrTokenStep

Steps to next token from a string using a string token parser. Uses any character defined in the string token parsing object delimiter character set as a delimiter.

Prototype

AjBool ajStrTokenStep (
      AjPStrTok token
);

TypeNameRead/WriteDescription
AjPStrToktokenModifyString token parsing object.
AjBool RETURNTrue if successfully parsed. False (and token parser deleted) if there is nothing more to parse.

From EMBOSS 6.6.0


Function ajStrTokenStepC

Steps to next token from a string using a string token parser. Uses any character defined in the delimiter character set as a delimiter.

Prototype

AjBool ajStrTokenStepC (
      AjPStrTok token,
      const char* txtdelim
);

TypeNameRead/WriteDescription
AjPStrToktokenModifyString token parsing object.
const char*txtdelimInputDelimiter character set.
AjBool RETURNTrue if successfully parsed. False (and string set to empty) if there is nothing more to parse.

From EMBOSS 6.6.0


Function ajStrTokenStepS

Parses tokens from a string using a string token parser. Uses any character defined in the delimiter character set as a delimiter.

Prototype

AjBool ajStrTokenStepS (
      AjPStrTok token,
      const AjPStr strdelim
);

TypeNameRead/WriteDescription
AjPStrToktokenModifyString token parsing object.
const AjPStrstrdelimInputDelimiter character set.
AjBool RETURNTrue if successfully parsed. False (and string set to empty) if there is nothing more to parse.

From EMBOSS 6.6.0