


XmTextFieldGetSubstring(3X)			  XmTextFieldGetSubstring(3X)
OSF/Motif							    OSF/Motif



NAME
  XXmmTTeexxttFFiieellddGGeettSSuubbssttrriinngg - A TextField	function that retrieves	a copy of a
  portion of the internal text buffer

SYNOPSIS


  ##iinncclluuddee <<XXmm//TTeexxttFF..hh>>
  iinntt XXmmTTeexxttFFiieellddGGeettSSuubbssttrriinngg ((_w_i_d_g_e_t, _s_t_a_r_t, _n_u_m__c_h_a_r_s, _b_u_f_f_e_r__s_i_z_e,
		      _b_u_f_f_e_r))
       WWiiddggeett	   _w_i_d_g_e_t;;
       XXmmTTeexxttPPoossiittiioonn_s_t_a_r_t;;
       iinntt	   _n_u_m__c_h_a_r_s;;
       iinntt	   _b_u_f_f_e_r__s_i_z_e;;
       cchhaarr	   **_b_u_f_f_e_r;;

DESCRIPTION
  XXmmTTeexxttFFiieellddGGeettSSuubbssttrriinngg retrieves a copy of a	portion	of the internal	text
  buffer of a TextField	widget.	 The function copies a specified number	of
  characters from a given start	position in the	internal text buffer into a
  buffer provided by the application.  A NULL terminator is placed at the end
  of the copied	data.

  The size of the required buffer depends on the maximum number	of bytes per
  character (MMBB__CCUURR__MMAAXX) for the current locale.  MMBB__CCUURR__MMAAXX is	a macro
  defined in _s_t_d_l_i_b._h.	The buffer should be large enough to contain the sub-
  string to be copied and a NULL terminator.  Use the following	equation to
  calculate the	size of	buffer the application should provide:

  _b_u_f_f_e_r__s_i_z_e =	(_n_u_m__c_h_a_r_s * MMBB__CCUURR__MMAAXX) + 1

  _w_i_d_g_e_t    Specifies the TextField widget ID.

  _s_t_a_r_t	    Specifies the beginning character position from which the data
	    will be retrieved.	This is	an integer number of characters	from
	    the	beginning of the text buffer.  The first character position
	    is 0.

  _n_u_m__c_h_a_r_s Specifies the number of characters to be copied into the provided
	    buffer.

  _b_u_f_f_e_r__s_i_z_e
	    Specifies the size of the supplied buffer in bytes.	 This size
	    should account for a NULL terminator.

  _b_u_f_f_e_r    Specifies the character buffer into	which the internal text
	    buffer will	be copied.

  For a	complete definition of TextField and its associated resources, see
  XXmmTTeexxttFFiieelldd((33XX)).


RETURN VALUE

  XXmmCCOOPPYY__SSUUCCCCEEEEDDEEDD    The function was successful.

  XXmmCCOOPPYY__FFAAIILLEEDD	      The function failed because it was unable	to copy	the
		      specified	number of characters into the buffer
		      provided.	 The buffer size may be	insufficient.  The
		      contents of _b_u_f_f_e_r are undefined.

  XXmmCCOOPPYY__TTRRUUNNCCAATTEEDD    The requested number of characters extended beyond the
		      internal buffer.	The function copied characters
		      between _s_t_a_r_t and	the end	of the widget's	buffer and
		      terminated the string with a NULL	terminator; fewer
		      than _n_u_m__c_h_a_r_s characters	were copied.

RELATED	INFORMATION
  XXmmTTeexxttFFiieelldd((33XX)) and XXmmTTeexxttFFiieellddGGeettSSuubbssttrriinnggWWccss((33XX)).























































