std.count

INTEGERstd.countIDcollection

Available inall subroutines.

Count the number of objects inside the given collection.

Example

sub vcl_recv {
set req.http.Number-of-Headers = std.count(req.headers);
}

User contributed notes

BETA

Do you see an error in this page? Do you have an interesting use case, example or edge case people should know about? Share your knowledge and help people who are reading this page! (Comments are moderated; for support, please contact Fastly support)