UTLSTR_R module routines - WIN32

Company Information Software Products TDF Market Reports Download Area take me Home

UTLSTR_R.C - Utility STRing Routines

A collection of useful string manipulation routines (they all expect NULL terminated strs).

Function eat_trailing_white_space
Include file UTLSTR_R.H
Prototype void eat_trailing_white_space( char *str )
Remarks Delete trailing white space from a str.

Function cnvt_nl_2_null
Include file UTLSTR_R.H
Prototype void cnvt_nl_2_null( char *str )
Remarks Replace all embedded newlines in source str with \000 (yielding substrings in the main string).

Function cnvt_line_to_uppercase
Include file UTLSTR_R.H
Prototype void cnvt_line_to_uppercase( char *str )
Remarks Convert all characters in the string to uppercase.

Function cnvt_line_to_lowercase
Include file UTLSTR_R.H
Prototype void cnvt_line_to_lowercase( char *str )
Remarks Convert all characters in the string to lowercase.

Function insert_str_into_str
Include file UTLSTR_R.H
Prototype void insert_str_into_str( char *dest , char *insert_str , int offset )
Remarks WARNING - this routine will do a detructive insert a str into the destination string since dest will get NULL terminated after the end of insert str.

Function copy_str_n_blank_pad
Include file UTLSTR_R.H
Prototype void copy_str_n_blank_pad( char *src , char *dest , int len )
Remarks Copy source string to destination and pad with spaces " " till user requested length. WARNING - this routine does not NULL terminate the destination string.

Function validate_with_str_array
Include file UTLSTR_R.H
Prototype int validate_with_str_array( char *validate_strs[] , char *target , int cnt )
Remarks Compare a target string to a array of strings. Return array index if matched else cnt as not found flag. This routine is useful for validating command verbs or user input.

Function validate_boolean_answer
Include file UTLSTR_R.H
Prototype int validate_boolean_answer( char *str )
Remarks Return TRUE if str is a valid_true [ "Y" | "YES" | "T" | "TRUE" ] else FALSE. This routine is layered on validate_with_str_array().

Function match_str_with_wildcard_support
Include file UTLSTR_R.H
Prototype int match_str_with_wildcard_support( char *match_str , char *source )
Remarks Support embedded ?'s as any single char.

Function safe_strcpy
Include file UTLSTR_R.H
Prototype void safe_strcpy( char *dest , char *source , int max_size )
Remarks This routine is a strncpy() with NULL terminator being forced into the destination string if necessary.

Table of Contents Function Index

generated on 22 September 1998 - 12:55:53
© 1998 Tierra del Fuego Ltd.