NAME

NstStr -- NST string functions

PROTOTYPES

char *NstInpStrCpy( unitptr u, int f, int iPos, char *pcStr)

char *NstInpStrCat( unitptr u, int f, int iPos, char *pcStr)

char *NstInpStrCat1( unitptr u, int f, int iPos, char *pcStr, int iOffset)

char *NstInpStrCpy1( unitptr u, int f, int iPos, char *pcStr, int iOffset)

char *NstOutStrCat( unitptr u, int f, int iPos, char *pcStr)

char *NstOutStrCpy( unitptr u, int f, int iPos, char *pcStr)

char *NstInpStrCat1( unitptr u, int f, int iPos, char *pcStr, int iOffset)

char *NstOutStrCpy1( unitptr u, int f, int iPos, char *pcStr, int iOffset)

char *NstOutPrintf( unitptr u, int f, int iPos, char *pcFmt, ...)

char *NstOutVPrintf( unitptr u, int f, int iPos, char *pcFmt, va_list vArg)

ARGUMENTS

unitptr u
host unit of destination text pin
int f
nr of input field of destination text pin
int iPos
position of destination pin within field
char *pcStr
the to be appended text
int iOffset
offset before catenating pcStr offset before copying pcStr
char *pcFmt
print format (as for printf() ) print format (as for printf() )
...
arguments to print
va_list vArg
list of to be printed arguments (like vprintf function )
NST-units that use string operations, the above functions should be used, since they take automatically care of memory REALLOCation and notification of connected reader pins about any string resize event.

THE STRCPY FUNCTIONS:

iOffset>=0: Result string has the initial iOffset chars from the original string in the pin, the remaining chars will be from pcStr. If the original string had less than iOffset chars, it is treated as if it had a sufficient number of additional spaces on the right. iOffset<0: return string concatenated from pcStr with the iOffset last chars of the original string. If pcDest has less than iOffset chars, it is treated as if it had a sufficient number of additional spaces to its left.

Examples:


   original abcde abcde abcde abcde
   pcStr xx xx xx xx
   iOffset 3 -3 -5 6
   result abcxx xxcde xx cde abcde xx

THE STRCAT FUNCTIONS:

Result string has the initial strlen(original)-iOffset chars from the original string, followed by all chars of pcStr, followed by the remaining iOffset chars from the original string. If the original string had less than iOffset chars, it is treated as if it had a sufficient number of additional spaces on the right.

Examples:


   original abcde abcde abcde abcde
   pcStr xx xx xx xx
   iOffset 0 -3 -6 1
   result abcdexx abxxcde xx abcde abcde xx

All string block sizes are assumed to be smallest integral multiples of NST_STRBLKSIZ.

FILE

/local/homes/rhaschke/nst7/man/../o.linx86//../nstsrc/nst_strg.c