Personal IDL library for M. Galloy

Directory: strings/

This directory contains routines useful for handling strings.

The DLM contains some wrappers to the TRE regular expression engine.

All the matches in a string can be found using the ALL keyword:

IDL> s = 'ii j i iiii jj ii' IDL> print, mg_stregex(s, 'i+', /all, /extract) ii i iiii ii
Approximate matches can be found using the APPROXIMATE keyword:
IDL> s = 'mike mjke Mike Mjke' IDL> print, mg_stregex(s, 'mike', /approx, /all, max_cost=1, /extract) mike mjke Mike

.pro files

Build mg_strings.*.so file.

Returns the newline separator(s) for the OS: linefeed on UNIX platforms and carriage return/linefeeds for Windows.

Returns the correct spelling of the given word.

Wrapper for STREGEX which includes a FIND_ALL keyword to find all occurrences within a scalar string.

Handle string replacment with regular expressions.

Class representing a string and an example of using operator overloading available in IDL 8.0.

Merges a string array into a single string separated by carriage return/linefeeds.

Splits a scalar string with newline characters into a string array.

Wrap a string into a character width limit space.

String substitution routine which substitutes values into a given string using the correspondences found in the provided hash or structure.


.dlm files

Personal library of Michael Galloy
Contact me if you have enhancement requests or bug fixes.