Main Page | Modules | Files | Functions | Code Elements | Data Structures | Deprecated

Teamcenter String
[Integration Tool Kit]

Functions


Function Documentation

FCLASSES_API char* stripBlanks ( char *  str  ) 

This returns a pointer to the first non-blank character in the given string after setting a \0 just after the last non-blank character. i.e. it returns a string with no leading or trailing spaces, having mangled the supplied string. Note that if you later free the string you must free the initial string (that you handed in), not the returned one.

stripTrailingBlanks(char* str) no longer exists. To duplicate functionality, just call stripBlanks on a string and IGNORE THE RETURNED POINTER!

FCLASSES_API void STRNG_clean_up_string ( char *  inputString  ) 

Smash all ASCII non-alphanummeric characters to _ but leave multibyte characters alone

FCLASSES_API logical STRNG_ends_with ( const char *  theString,
const char *  theEndString 
)

Checks if 'theString' ends with 'theEndString'

FCLASSES_API char* STRNG_find_first_char ( const char *  inputString,
const char  match 
)

Return a pointer (or NULL) to the first/last match of the given ASCII character, even in the face of multibyte characters. The given character must be a single-byte character

FCLASSES_API char* STRNG_find_last_char ( const char *  inputString,
const char  match 
)

FCLASSES_API void STRNG_limit_characters ( char *  inputString,
const char *  characterSet,
char  replacement 
)

Replaces all characters not in characterSet by replacement (unless they are multibyte)

FCLASSES_API char* STRNG_mb_strncat ( char *  szOutputString,
const char *  szInputString,
const int  iMaxLength 
)

FCLASSES_API char* STRNG_mb_strncpy ( char *  szOutputString,
const char *  szInputString,
const int  iMaxLength 
)

FCLASSES_API logical STRNG_mb_yesno ( const char *  szInputString  ) 

FCLASSES_API void STRNG_MegaBytesToText ( long int  megaBytes,
char  text[50] 
)

Deprecated:
This function is deprecated and will be removed from Tc12. In Tc10 onwards, please use STRNG_MegaBytesToText2
Returns a text version of given int in a form like 4.2M, 3K or 10G as appropriate

FCLASSES_API void STRNG_MegaBytesToText2 ( long int  megaBytes,
char **  text 
)

Returns a text version of given int in a form like 4.2M, 3K or 10G as appropriate

Parameters:
text  (I) (OF)

FCLASSES_API int STRNG_quote_xml ( const char *  input,
char **  output 
)

Quote XML using appropriate entities

Parameters:
input  (I)
output  (OF)

FCLASSES_API int STRNG_replace_str ( const char *  input,
const char *  strToBereplaced,
const char *  strToBeUsedInstead,
char **  output 
)

Replaces the occurrence of string "strToBereplaced" with string "strToBeUsedInstead" in input string and fills the output string with the resultant string.

FCLASSES_API void STRNG_to_lower ( char *  inputString  ) 

Converts A-Z to lower case in given string, coping even if it is a multibyte string. Please note this function does not work correctly for Hebrew text. For case like Hebrew text, you can use tc_strupr or tc_strlwr, or STRNG_to_lower2/STRNG_to_upper2. These functions call TEXT_* functions which take account of the localization settings on the machine. These functions correctly perform the upper/lower case for all character sets.

FCLASSES_API void STRNG_to_lower2 ( const char *  str,
char **  ustr 
)

This function calls TEXT_* functions which take account of the localization settings on the machine. This function correctly performs the upper/lower case for all character sets.

FCLASSES_API void STRNG_to_upper ( char *  inputString  ) 

Converts A-Z to upper case in given string, coping even if it is a multibyte string. Please note this function does not work correctly for Hebrew text. For case like Hebrew text, you can use tc_strupr or tc_strlwr, or STRNG_to_lower2/STRNG_to_upper2. These functions call TEXT_* functions which take account of the localization settings on the machine. These functions correctly perform the upper/lower case for all character sets.

FCLASSES_API void STRNG_to_upper2 ( const char *  str,
char **  ustr 
)

This function calls TEXT_* functions which take account of the localization settings on the machine. This function correctly performs the upper/lower case for all character sets.

FCLASSES_API signed long long tc_atoll ( const char *  str  ) 

FCLASSES_API void tc_str_contains_wildcard ( const char *  n,
logical contained 
)

FCLASSES_API void tc_str_contains_wildcard_at ( const char *  n,
logical contained,
int *  position 
)

FCLASSES_API int tc_strcasecmp ( const char *  s1,
const char *  s2 
)

FCLASSES_API char* tc_strcat ( char *  s1,
const char *  s2 
)

FCLASSES_API int tc_strcmp ( const char *  s1,
const char *  s2 
)

FCLASSES_API char* tc_strcpy ( char *  s1,
const char *  s2 
)

FCLASSES_API void tc_strdup ( const char *  str,
char **  dstr 
)

FCLASSES_API size_t tc_strlen ( const char *  s  ) 

FCLASSES_API void tc_strlwr ( const char *  str,
char **  lstr 
)

Parameters:
str  (I) Input string
lstr  (OF) Output string

FCLASSES_API int tc_strncasecmp ( const char *  s1,
const char *  s2,
size_t  len 
)

FCLASSES_API char* tc_strncpy ( char *  s1,
const char *  s2,
size_t  size 
)

FCLASSES_API char* tc_strstr ( const char *  s1,
const char *  s2 
)

FCLASSES_API char* tc_strtok ( char *  cptr,
const char *  seps 
)

FCLASSES_API char* tc_strtok_and_delimiter ( char *  cptr,
const char *  seps,
char **  matchedSep 
)

FCLASSES_API void tc_strupr ( const char *  str,
char **  ustr 
)