Borland C++ reference

strxfrm

raw OCR

Transforms a portion of a string.

Defined in header <string.h>

Syntax

#include <string.h>
size_t strxfrm(char   *sl, char *s2, size_t n);

Portability

DOSUNIXWindowsANSI CC++ only
■■■

Remarks

strxfrm transforms the string pointed to by s2 into the string si for no more than n characters.

Return value

Number of characters copied.

See also

Example

#include <stdic.h>
#include <string.h>
#include <alloc.h>

int main(void)
{
   char *target, *source   "Frank Borland"
   int length;

   /* allocate space for the target string */
   target = (char *) calloc(80, sizeof(char));

   /* copy the source over to the target and get the length */
   length = strxfrm(target, source, 80);
   /* print out the results */
   printf("%s has the length %d\n", target, length);
   return 0;

Differences from modern implementations

Nothing recorded yet.

Modern references

These are search links, not yet checked by hand.