getstreameol            package:Rstreams            R Documentation

_D_e_t_e_r_m_i_n_e _a _S_t_r_e_a_m'_s _E_n_d-_o_f-_L_i_n_e _M_a_r_k_e_r

_D_e_s_c_r_i_p_t_i_o_n:

     Examines a stream to determine the end-of-line marker.

_U_s_a_g_e:

       getstreameol(stream, bufsize = 256)

_A_r_g_u_m_e_n_t_s:

  stream: an already opened stream.

 bufsize: buffer size for use by `readchar'.

_D_e_t_a_i_l_s:

     Reads characters from the stream until it finds a CR, LF, or CR/LF
     end of line marker.  These are the defaults used in text files on
     the Mac, Unix, and PCs respectively. Returns marker in a string,
     as `'\r'', `'\n'', or `'\r\n''.

_V_a_l_u_e:

     A character variable holding the end-of-line marker.

_S_e_e _A_l_s_o:

     `readlines',`openstream'

_E_x_a_m_p_l_e_s:

     dump("getstreameol","mydata")
     s <- openstream("mydata")
     getstreameol(s)
     closestream(s)
     unlink("mydata")

