Changes between Version 42 and Version 43 of Help/Styles/MapCSSImplementation
- Timestamp:
- 2014-03-06T21:47:05+01:00 (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Help/Styles/MapCSSImplementation
v42 v43 868 868 rgb(''r'', ''g'', ''b''):: 869 869 create color value (arguments from 0.0 to 1.0) 870 hsb_color(''h'', ''s'', ''b''):: 871 create color from hue, saturation and brightness (arguments from 0.0 to 1.0) [''since 6877''] 870 872 red(''clr''), green(''clr''), blue(''clr''):: 871 873 get value of color channels in rgb color model … … 876 878 length(''lst''):: 877 879 length of a list [''since 5699''] 880 coalesce(obj1, obj2, ...):: 881 returns the first object which is not null [''since 6611''] 878 882 concat(''str1'', ''str2'', ...):: 879 883 assemble the strings to one 884 join(''sep'', ''str1'', ''str2'', ...):: 885 join strings, whith ''sep'' as separator [''since 6737''] 880 886 JOSM_search("..."):: 881 887 true, if JOSM search applies to the object 888 tr(str, arg0, arg1, ...):: 889 translate from English to the current language (only for strings in the JOSM user interface) [''since 6506''] 882 890 regexp_test(regexp, string):: 883 891 test if ''string'' matches pattern ''regexp'' [''since 5699''] … … 888 896 regexp_match(regexp, string, flags):: 889 897 Tries to match ''string'' against pattern ''regexp''. Returns a list of capture groups in case of success. The first element (index 0) is the complete match (i.e. ''string''). Further elements correspond to the bracketed parts of the regular expression. Flags is a string that may contain "i" (case insensitive), "m" (multiline) and "s" ("dot all") [''since 5701''] 898 substring(str, idx):: 899 return the substring of ''str'', starting at index ''idx'' (0-indexed) [''since 6534''] 900 substring(str, start, end):: 901 return the substring of ''str'', starting at index ''start'' (inclusive) up to ''end'' (exclusive) (0-indexed) [''since 6534''] 890 902 replace(string, old, new):: 891 903 Replaces any occurrence of the substring ''old'' within the string ''string'' with the text ''new'' 892 904 osm_id():: 893 905 returns the OSM id of the current object [''since 5699''] 906 URL_encode(str):: 907 [https://en.wikipedia.org/wiki/Percent-encoding percent-encode] a string. May be useful for data URLs [''since 6805''] 908 XML_encode(str):: 909 escape special characters in xml. E.g. {{{<}}} becomes {{{<}}}, other special characters: {{{>}}}, {{{"}}}, {{{'}}}, {{{&}}}, {{{\n}}}, {{{\t}}} and {{{\r}}} [''since 6809''] 910 CRC32_checksum(''str''):: 911 calculate the CRC32 checksum of a string (result is an integer from 0 to 2^32^-1) [''since 6899''] 894 912 {{{#!comment: untested 895 913 JOSM_pref(''key'', ''default'')