Commit 28c97a8c authored by rswindell's avatar rswindell
Browse files

Created lastchar() utility function (returns last character in string).

parent 7aa4720f
......@@ -55,6 +55,20 @@
#include "genwrap.h" /* Verify prototypes */
/****************************************************************************/
/* Return last character of string */
/****************************************************************************/
char DLLCALL lastchar(const char* str)
{
size_t len;
len = strlen(str);
if(len)
return(str[len-1]);
return(0);
}
/****************************************************************************/
/* Convert ASCIIZ string to upper case */
/****************************************************************************/
......
......@@ -123,6 +123,8 @@ extern "C" {
#endif
#endif
DLLEXPORT char DLLCALL lastchar(const char* str);
/****************************/
/* Common Utility Functions */
/****************************/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment