sdk/core/core/inc/az_span.h
/**
 * @brief returns a span with the left @n bytes of the given @span.
 *
 * If the @n is greater than the @span.size than the whole @span is returned.
 */
@brief returns a span with the left @n bytes of the given @span.
If the @n is greater than the @span.size than the whole @span is returned.
@brief returns a span with the left @n bytes of the given @span . If the @n is greater than the @span . size than the whole @span is returned .
static inline az_const_span az_const_span_take(az_const_span const span, size_t const n) {
  if (span.size <= n) {
    return span;
  }
  return (az_const_span){ .begin = span.begin, .size = n };
}
static inline az_const_span az_const_span_take ( az_const_span const span , size_t const n ) { if ( span . size <= n ) { return span ; } return ( az_const_span ) { . begin = span . begin , . size = n } ; }
@brief returns a span with the left @n bytes of the given @span.
@brief returns a span with the left @n bytes of the given @span .