<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to String format</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/5fad5be951/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/5fad5be951/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/5fad5be951/</id><updated>2021-04-10T11:13:18.141000Z</updated><subtitle>Recent posts to String format</subtitle><entry><title>String format</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/5fad5be951/?limit=25#c98f" rel="alternate"/><published>2021-04-10T11:13:18.141000Z</published><updated>2021-04-10T11:13:18.141000Z</updated><author><name>pruwetbe</name><uri>https://forge.codesys.com/u/pruwetbe/</uri></author><id>https://forge.codesys.com6c126042bbfaf7402cffb2aa219f5bf289696e11</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;OK i finally found the way to add it to my application&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>String format</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/5fad5be951/?limit=25#3165" rel="alternate"/><published>2021-04-10T05:53:09.966000Z</published><updated>2021-04-10T05:53:09.966000Z</updated><author><name>pruwetbe</name><uri>https://forge.codesys.com/u/pruwetbe/</uri></author><id>https://forge.codesys.comc28be92752cc0e0e5872e0f61162062b043ba767</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;br/&gt;
I want to use the StuSprintf function from this library to format real value to string send in a Text file.&lt;/p&gt;
&lt;p&gt;I search in my Library manager but could not find the StringUtils in the list.&lt;br/&gt;
I tried to add it without results but this library is visible in my codesys library repository under the system folder.&lt;/p&gt;
&lt;p&gt;So i thought:  As it is a system library, perhaps it is implicitly included...&lt;/p&gt;
&lt;p&gt;When I add the function StuSprintf in my CFC code, the bloc interface is displayed  correctly and I can configure the input &amp;amp; output. &lt;br/&gt;
But StuSprintf stay red underlined with a warning saying Indentifier 'StuSprintf'  not defined. How to solve this?&lt;/p&gt;
&lt;p&gt;I am working with codesys V3.5 SP16 patch4 and my Target device Codesys Control for Raspberry Pi MC SL. &lt;/p&gt;
&lt;p&gt;Thanks for any help&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>String format</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/5fad5be951/?limit=25#cdc9" rel="alternate"/><published>2020-02-27T14:04:15.893000Z</published><updated>2020-02-27T14:04:15.893000Z</updated><author><name>HenryK</name><uri>https://forge.codesys.com/u/henryk/</uri></author><id>https://forge.codesys.come2802279cf8b6418e9685de995ba3b67e6f85b92</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;br/&gt;
I got the information from 3S that since CoDeSys V3 all String functions are threadsafe. Thus the problem has been solved by itself.&lt;br/&gt;
However, I also got the information, it is recommended to use the StringUtils lib, because it is more performant than the functions from the Standard lib.&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>String format</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/5fad5be951/?limit=25#ad94" rel="alternate"/><published>2020-02-27T14:04:15.606000Z</published><updated>2020-02-27T14:04:15.606000Z</updated><author><name>HenryK</name><uri>https://forge.codesys.com/u/henryk/</uri></author><id>https://forge.codesys.com16810fe42013792657f4aa2e532c24fa1cd181c9</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;br/&gt;
recently I faced a warning in a document what tells me:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Zitat:&lt;/strong&gt;&lt;br/&gt;
Plaese note, string functions are not "thread safe": When using tasks, string functions may only be used in a single task. If the same function is used in different tasks, there is a danger of overwriting.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Okay, clear so far. It is like it is. I am looking for a general solution how to deal with this restriction in POUs provided in libraries. &lt;br/&gt;
Do you recommend to use in general the functions from the StringUtils.library?&lt;br/&gt;
For my opinion the usage of this lib in my situation brings me two advantages:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;I avoid the use of the STRING functions from the Standard lib, thus there is no risk in conjunction with MultiTask apps where my POUs are implemented later.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The program becomes more performant.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Maybe it sounds a little bit stupid, because I answered teh question by myself. But I am really looking for an external opinion to strengthen my decision, not to use the String functions from the Standard lib in my libraries.&lt;/p&gt;
&lt;p&gt;Thank you for your feedback.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>String format</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/5fad5be951/?limit=25#92c6" rel="alternate"/><published>2020-02-27T14:04:14.738000Z</published><updated>2020-02-27T14:04:14.738000Z</updated><author><name>eschwellinger</name><uri>https://forge.codesys.com/u/eschwellinger/</uri></author><id>https://forge.codesys.com604c035a4e8e158f4e9ea54bfe4bc5988cef30e1</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;in any case it is much more performant if you use StringUtils.library in compare to use the string/concat whatever from Standard library.&lt;/p&gt;
&lt;p&gt;BR&lt;br/&gt;
Edwin&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: StringUtils.jpg" rel="nofollow" src="https://forum.codesys.com//download/file.php?id=2375"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>String format</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/5fad5be951/?limit=25#bc26" rel="alternate"/><published>2020-02-27T14:04:14.398000Z</published><updated>2020-02-27T14:04:14.398000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.comd31e7ee64a55bdde38584e9c4d3506cd919368dd</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; scott_cunningham&lt;/p&gt;
&lt;p&gt;I also don't use CONCAT. I use my own byte copy routine. Sorry, IEC isn't setup to have fancy string handlers.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>String format</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/5fad5be951/?limit=25#f437" rel="alternate"/><published>2020-02-27T14:04:14.085000Z</published><updated>2020-02-27T14:04:14.085000Z</updated><author><name>alex87</name><uri>https://forge.codesys.com/u/alex87/</uri></author><id>https://forge.codesys.comd5d47a3800ed9c135304f5f9e71bc395702c9afb</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I am familiar with CONCAT but I am seeking for more elegant solution for longer strings. Also, CONCAT is rather slow.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>String format</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/5fad5be951/?limit=25#77ae" rel="alternate"/><published>2020-02-27T14:04:13.740000Z</published><updated>2020-02-27T14:04:13.740000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.com8106cced5cbd976d8ea0742987696aa8884f6ed2</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; scott_cunningham&lt;/p&gt;
&lt;p&gt;You have to build the string. See CONCAT and associated key words&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>String format</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/5fad5be951/?limit=25#bf48" rel="alternate"/><published>2020-02-27T14:04:12.835000Z</published><updated>2020-02-27T14:04:12.835000Z</updated><author><name>alex87</name><uri>https://forge.codesys.com/u/alex87/</uri></author><id>https://forge.codesys.com8bc155bb954a5a122eb089c8b7f2ce6e446e1b8e</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Is there a C equivalent function in Codesys for string formatting?&lt;/p&gt;
&lt;p&gt;For example: sprintf(str, "%d,%d,%d", a, b, c);&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>