Back to index

im-sdk  12.3.91
Functions
IMUtil.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/param.h>
#include "SunIM.h"
#include "SunIMLock.h"

Go to the source code of this file.

Functions

int utfchar_length (UTFCHAR *p)
UTFCHARutfchar_copy (UTFCHAR *dest, UTFCHAR *src)

Function Documentation

UTFCHAR* utfchar_copy ( UTFCHAR dest,
UTFCHAR src 
)

Definition at line 64 of file IMUtil.c.

{
  int len;

  if (!src || !dest) return NULL;

  len = utfchar_length (src);
  memcpy (dest, src, sizeof (UTFCHAR) * len);
  dest[len] = 0;

  return dest;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int utfchar_length ( UTFCHAR p)

Definition at line 54 of file IMUtil.c.

{
  int len = 0;

  while (*p) { ++len; ++p; }

  return len;
}

Here is the caller graph for this function: