Back to index

plt-scheme  4.2.1
Defines | Functions
String.cc File Reference
#include "wx.h"
#include <string.h>

Go to the source code of this file.

Defines

#define Uses_wxObject

Functions

char * copystring (const char *s)
void wxGetLabelAndKey (char *label, char **clean_label, char **clean_key)

Define Documentation

#define Uses_wxObject

Definition at line 27 of file String.cc.


Function Documentation

char* copystring ( const char *  s)

Definition at line 36 of file String.cc.

{
  size_t len;
  char *news;

  if (s == NULL) s = "";
  len = strlen (s) + 1;
  news = new WXGC_ATOMIC char[len];
  memcpy(news, s, len);        // Should be the fastest
  return news;
}

Here is the caller graph for this function:

void wxGetLabelAndKey ( char *  label,
char **  clean_label,
char **  clean_key 
)

Definition at line 61 of file String.cc.

{
    char *key, *s;

    s = copystring(label); // make private copy
    *clean_label = s;
#if 0
    char *amp;
    if ((amp = strchr(*clean_label, '&'))) { // is there an ampersand? -> erase
       memmove(amp, amp+1, strlen(amp+1) + 1);
    }
#endif
    if ((key=strchr(*clean_label, '\t'))) // is there a key binding? -> split
       *key++ ='\0';
    if (clean_key)
      *clean_key = key; // point to key binding in private copy
}

Here is the call graph for this function:

Here is the caller graph for this function: