I have nodejs TCP server and client. There is a basic network connection. The client sends "data + STX_CHARACTER + data + ETX_CHARACTER" (just an example).
How to split a string using an STX control character as a delimiter, or how I generally refer to a character in Javascript.
STX and ETX are the characters 0x02 and 0x03 respectively, so it will just be "\ 2" and "\ 3". Just use string.split ("\ 2") and .split ("\ 3") in the second fragment from the first fragment to get your data.
, (0x17). 23. , : console.log(yourString.split(String.fromCharCode(23)));
Source: https://habr.com/ru/post/1745921/More articles:How to handle exceptions in large base codes - c #How can I make Hpricot play well with HTML5? - ruby | fooobar.comProblem with closed img tag - ruby-on-railshttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1745919/how-do-i-create-a-local-bare-repository-with-tortoisegit&usg=ALkJrhgWxGgw_NxzRy81systcCijhW1ggwtortoisegit push successful but no new files? - gitComplaint Management System - crmКак я могу использовать php-массив в поисковом запросе mysql? - sqlHow to create a UISplitView manually? - objective-cTime zones of different countries - javascriptСтатическое свойство, теряющее свою ценность с перерывами? - propertiesAll Articles