bigloo.foreign.bgl_escape_scheme_string C# (CSharp) Method

bgl_escape_scheme_string() public static method

public static bgl_escape_scheme_string ( byte src, int start, int end ) : byte[]
src byte
start int
end int
return byte[]
        public static byte[] bgl_escape_scheme_string( byte[] src, int start, int end )
        {
            int w = 0;

             for( int i = start; i < end; ++i ) {
            ++w;
            if (src[i] == (byte)'\\') ++i;
             }

             byte[] dst = new byte[w];

             w = 0;
             for( int i = start; i < end; ++i ) {
            byte cn = src[i];

            if (cn != (byte)'\\') {
               dst[w++] = (byte)cn;
            } else {
               ++i;
               dst[w++] = ((src[i]=='n') ? (byte)'\n' : src[i]);
            }
             }

             return dst;
        }
foreign