Garry's Mod Wiki

list.HasEntry

  boolean list.HasEntry( string list, any key )

Description

Returns true if the list contains the given key.

For a function that looks for values and not keys see list.Contains.

Arguments

1 string list
List to search through
2 any key
The key to test

Returns

1 boolean
Returns true if the list contains the key, false otherwise