Author: adrian.chadd
Date: Mon Feb  2 11:57:56 2009
New Revision: 13788

Modified:
    branches/LUSCA_HEAD/libmem/String.h

Log:
add in a string character accessor function



Modified: branches/LUSCA_HEAD/libmem/String.h
==============================================================================
--- branches/LUSCA_HEAD/libmem/String.h (original)
+++ branches/LUSCA_HEAD/libmem/String.h Mon Feb  2 11:57:56 2009
@@ -16,6 +16,7 @@
  #define strBuf2(s)     ((const char*)(s).buf)
  #define strCat(s,str)         stringAppend(&(s), (str), strlen(str))
  #define       strCatStr(ds, ss)       stringAppend(&(ds), strBuf2(ss), 
strLen(ss))
+static inline char stringGetCh(const String *s, int pos) { return  
strBuf2(*s)[pos]; }

  #define strCmp(s,str)         strcmp(strBuf(s), (str))
  #define strNCmp(s,str,n)      strncmp(strBuf(s), (str), (n))
@@ -33,6 +34,7 @@
  extern char * stringDupSubstrToC(const String *s, int len);
  extern int strChr(String *s, char c);
  extern int strRChr(String *s, char c);
+

  /*
   * These is okish, but the use case probably should be replaced with a  
strStr() later

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"lusca-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/lusca-commit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to