{"action":"opened","issue":{"url":"https://api.github.com/repos/KSP-KOS/KOS/issues/1821","repository_url":"https://api.github.com/repos/KSP-KOS/KOS","labels_url":"https://api.github.com/repos/KSP-KOS/KOS/issues/1821/labels{/name}","comments_url":"https://api.github.com/repos/KSP-KOS/KOS/issues/1821/comments","events_url":"https://api.github.com/repos/KSP-KOS/KOS/issues/1821/events","html_url":"https://github.com/KSP-KOS/KOS/issues/1821","id":177673326,"number":1821,"title":"UniqueSet of Strings is case sensitive ","user":{"login":"Kramax","id":14958160,"avatar_url":"https://avatars.githubusercontent.com/u/14958160?v=3","gravatar_id":"","url":"https://api.github.com/users/Kramax","html_url":"https://github.com/Kramax","followers_url":"https://api.github.com/users/Kramax/followers","following_url":"https://api.github.com/users/Kramax/following{/other_user}","gists_url":"https://api.github.com/users/Kramax/gists{/gist_id}","starred_url":"https://api.github.com/users/Kramax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kramax/subscriptions","organizations_url":"https://api.github.com/users/Kramax/orgs","repos_url":"https://api.github.com/users/Kramax/repos","events_url":"https://api.github.com/users/Kramax/events{/privacy}","received_events_url":"https://api.github.com/users/Kramax/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-18T20:04:25Z","updated_at":"2016-09-18T20:04:25Z","closed_at":null,"body":"In kOS 1.0.0 I was trying to make a unique set of fuels by string and it was not working. Turns out it seems the string equality used for UniqueSet is case sensitive even though it is insensitive for other compares. This makes the \"Contains\" suffix inconsistent for UniqueSet. You can use List and it works. Examples:\r\n\r\nset fuels to UniqueSet(\"LiquidFuel\",\"Oxidizer\",\"LQDOXYGEN\",\"LQDHYDROGEN\").\r\n\r\nprint \"is 'liquidfuel' in fuels? \" + fuels:CONTAINS(\"liquidfuel\"). // prints False\r\nprint \"is 'LiquidFuel' in fuels? \" + fuels:CONTAINS(\"LiquidFuel\"). // prints True\r\n\r\n// works for lists\r\nset fuels to List(\"LiquidFuel\",\"Oxidizer\",\"LQDOXYGEN\",\"LQDHYDROGEN\").\r\n\r\nprint \"is 'liquidfuel' in fuels? \" + fuels:CONTAINS(\"liquidfuel\"). // print True\r\nprint \"is 'LiquidFuel' in fuels? \" + fuels:CONTAINS(\"LiquidFuel\"). // print True"}}
{"actor":{"display_login":"Kramax"}}