{"action":"created","issue":{"url":"https://api.github.com/repos/KSP-KOS/KOS/issues/636","labels_url":"https://api.github.com/repos/KSP-KOS/KOS/issues/636/labels{/name}","comments_url":"https://api.github.com/repos/KSP-KOS/KOS/issues/636/comments","events_url":"https://api.github.com/repos/KSP-KOS/KOS/issues/636/events","html_url":"https://github.com/KSP-KOS/KOS/issues/636","id":59631858,"number":636,"title":"Discussion: what String functions we want to introduce into kOS.","user":{"login":"ZiwKerman","id":11242352,"avatar_url":"https://avatars.githubusercontent.com/u/11242352?v=3","gravatar_id":"","url":"https://api.github.com/users/ZiwKerman","html_url":"https://github.com/ZiwKerman","followers_url":"https://api.github.com/users/ZiwKerman/followers","following_url":"https://api.github.com/users/ZiwKerman/following{/other_user}","gists_url":"https://api.github.com/users/ZiwKerman/gists{/gist_id}","starred_url":"https://api.github.com/users/ZiwKerman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZiwKerman/subscriptions","organizations_url":"https://api.github.com/users/ZiwKerman/orgs","repos_url":"https://api.github.com/users/ZiwKerman/repos","events_url":"https://api.github.com/users/ZiwKerman/events{/privacy}","received_events_url":"https://api.github.com/users/ZiwKerman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-03-03T11:57:38Z","updated_at":"2015-03-03T16:46:26Z","closed_at":null,"body":"I've been tinkering with adding some String manipulation functions in my local build of kOS and following examples in the existing code was able to successfully implement a list very simple String functions such as\r\n\r\nbool contains(String, SearchString)\r\n\r\nbool StartsWith(String, SearchString)\r\n\r\nbool EndsWith(String, SearchString)\r\n\r\nList Split(String, SplitString).\r\n\r\nThey work like usual functions (min, round and etc), and they were rather easy to implement as they just mimick very basic string manipulation. Only Split function required some more code hunting, but I ended up using parts of code from buildlist function.\r\n\r\nMy questions are\r\n \r\n * What set of String Manipultaion functions we want to introduce into kOS? \r\n * Do we want them as functions like simple math functions or make them as suffixes?\r\n\r\nIf we settle on a certain limited set of functions, I can implement them, write the relevant docs and submit a PR.\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/KSP-KOS/KOS/issues/comments/76983362","html_url":"https://github.com/KSP-KOS/KOS/issues/636#issuecomment-76983362","issue_url":"https://api.github.com/repos/KSP-KOS/KOS/issues/636","id":76983362,"user":{"login":"Dunbaratu","id":5216848,"avatar_url":"https://avatars.githubusercontent.com/u/5216848?v=3","gravatar_id":"","url":"https://api.github.com/users/Dunbaratu","html_url":"https://github.com/Dunbaratu","followers_url":"https://api.github.com/users/Dunbaratu/followers","following_url":"https://api.github.com/users/Dunbaratu/following{/other_user}","gists_url":"https://api.github.com/users/Dunbaratu/gists{/gist_id}","starred_url":"https://api.github.com/users/Dunbaratu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dunbaratu/subscriptions","organizations_url":"https://api.github.com/users/Dunbaratu/orgs","repos_url":"https://api.github.com/users/Dunbaratu/repos","events_url":"https://api.github.com/users/Dunbaratu/events{/privacy}","received_events_url":"https://api.github.com/users/Dunbaratu/received_events","type":"User","site_admin":false},"created_at":"2015-03-03T16:46:26Z","updated_at":"2015-03-03T16:46:26Z","body":"In general operating via methods of a class (which is what the suffixes are trying to emulate) is a better design because it's more portable to other language bindings.  if someone is trying to make a Javascript or a C# compiler FOR kOS then all the stuff currently implemented in kerboscript's syntax has to be re-implemented for them.  Whereas anything that is an object suffix they get \"for free\" by just generically mapping all object suffix references with the same generic code.  I.e. as long as someone writing a Javascript mapping of kOS has made some generic way to map aaa.bbb(ccc) into aaa.getsuffix(\"bbb\")(ccc), they've got all that functionality in their language binding too,\r\n\r\nAnyway that's my reason for preferring doing things with suffixes over  doing them outside the suffix system.\r\n"}}