Module gamejs/utils/strings

Working with strings

Functions


getCommonPrefix (str1, str2)

Get the longest common segment that two strings have in common, starting at the beginning of the string

Parameters

String str1 a string
String str2 another string

Returns

String the longest common segment