src/compressed-sensing/lib/include/Armadillo/armadillo_bits/format_wrap.hpp
inline
      int
      arma_snprintf(char* out, size_t size, const char* fmt, ...)
        {
        size_t i;
        
        for(i=0; i<size; ++i)
          {
          out[i] = fmt[i];
          if(fmt[i] == char(0))
            break;
          }
        
        if(size > 0)
          out[size-1] = char(0);
        
        return int(i);
        }
// better-than-nothing emulation of C99 snprintf(),
// with correct return value and null-terminated output string.
// note that _snprintf() provided by MS is not a good substitute for snprintf()
better-than-nothing emulation of C99 snprintf(),
with correct return value and null-terminated output string.
note that _snprintf() provided by MS is not a good substitute for snprintf()
better - than - nothing emulation of C99 snprintf () with correct return value and null - terminated output string . note that _snprintf () provided by MS is not a good substitute for snprintf ()
inline
      int
      arma_snprintf(char* out, size_t size, const char* fmt, ...)
        {
        size_t i;
        for(i=0; i<size; ++i)
          {
          out[i] = fmt[i];
          if(fmt[i] == char(0))
            break;
          }
        if(size > 0)
          out[size-1] = char(0);
        return int(i);
        }
inline int arma_snprintf ( char * out , size_t size , const char * fmt , ... ) { size_t i ; for ( i = 0 ; i < size ; ++ i ) { out [ i ] = fmt [ i ] ; if ( fmt [ i ] == char ( 0 ) ) break ; } if ( size > 0 ) out [ size - 1 ] = char ( 0 ) ; return int ( i ) ; }
better-than-nothing emulation of C99 snprintf(),
with correct return value and null-terminated output string.
better - than - nothing emulation of C99 snprintf () with correct return value and null - terminated output string .