QGIS/resources/function_help/json/hamming_distance
Nyall Dawson 709c14391b Change expression help from free form html files to structured json
A new script then parses these json help files into the html help
contents, in a standardised manner. Previously, the function help
was a bunch of different formats and structures.

Now, a custom stylesheet can be applied (and later tweaked!) to
format these help. Eg, this commit colors variables and function
names in the syntax section for greater readability.
2015-09-02 14:22:50 +10:00

12 lines
654 B
Plaintext

{
"function": "hamming_distance",
"description": "Returns the Hamming distance between two strings. This equates to the number of characters at corresponding positions within the input strings where the characters are different. The input strings must be the same length, and the comparison is case-sensitive.",
"arguments": [ {"arg":"string1","description":"a string"},
{"arg":"string2","description":"a string"}
],
"examples": [ { "expression":"hamming_distance('abc','xec')", "returns":"2"},
{ "expression":"hamming_distance('abc','ABc')", "returns":"2"},
{ "expression":"hamming_distance(upper('abc'),upper('ABC'))", "returns":"0"}
]
}