This language bar is your friend. Select your favorite languages!
def n = x.size()
with Ada.Containers.Vectors;
use Ada.Containers;
N : Count_Type := X.Length;
size_t n = sizeof(x)/sizeof(*x);
(def n (count x))
size_t n = x.size();
using System.Collections.Generic;
int n = x.Count;
int n = x.Length;
auto n = x.length;
import std.range.primitives;
n = walkLength(x);
int n = x.length;
n = Enum.count(x)
N = length(X).
n = size(x)
n := len(x)
n = length x
var n = x.length;
int n = x.size();
int n = x.length;
val n = x.size
(setf n (length x))
local n = #x
@import Foundation;
NSUInteger n=x.count;
$n = count($x);
n := length(x);
$n = scalar @x;
my $N = @x;
n = len(x)
n = x.length
let n = x.len();

val n = x.size
(define n (length x))
Dim x As New List(Of String)(New String() {"one", "two", "three"})
Dim n as Integer = x.Count

Do you know the best way to do this in your language ?
New implementation...

Idiom created by

Related idioms