Skip to content

Protected string functions for C/C++ and IEC 61131-3

License

Notifications You must be signed in to change notification settings

tmatijevich/IecString

Repository files navigation

IecString

Made for B&R GitHub License GitHub Downloads (all assets, all releases) GitHub issues

IecString is an Automation Studio library of string functions.
The functions enhance string manipulation, protect memory, and support ANSI C/C++ and IEC 61131-3.

NOTE: This is not an official library and is supported through the community. IecString is provided as-is under the MIT License agreement. Source code, documentation, and issues are managed through GitHub.

Features

Function Read Write Description
IecStringCopy 🔍 📝 Copy source to destination up to size of destination or source length
IecStringConcat 🔍 📝 Concatenate source to destination up to size of destination or source length
IecStringCompare 🔍 Compare characters of two strings
IecStringLength 🔍 Determine the length of a string
IecStringFirst 🔍 First occurrence of character in source
IecStringLast 🔍 Last occurrence of character in source
IecStringFind 🔍 Find substring in source
IecStringFirstIn 🔍 First occurrence in source of any character from find
IecStringLengthIn 🔍 Initial length in source containing only characters from find
IecStringStartsWith 🔍 Does source start with prefix
IecStringEndsWith 🔍 Does source end with suffix
IecStringReplace 🔍 📝 Find in source and replace in destination
IecStringSplit 🔍 📝 Split source into tokens
IecStringFormat 🔍 📝 Format string with runtime data
IecStringDecimal 📝 Convert integer to string as decimal
IecStringFloat 📝 Convert float to string
IecStringDateTime 🔍 📝 Format date and/or time

🔍 The functions marked in the read column are reading from memory.
📝 The functions marked in the write column are writing to memory within the size of destination.

Install

  • Download the binaries and extract the archive
  • Add to the project as existing library from the toolbox in logical view

Build

  • Clone or download source files
  • Add to the project as existing library
    • Option to add as reference

Alternatively, add as submodule to an existing project repository.

cd <repository>
git submodule add https://github.com/tmatijevich/IecString.git <project>/Logical/Libraries/IecString

Then add to project as existing library.

Performance & Unit Tests

See the IecStringProject for all function unit tests and hardware performance tests.

Documentation

Once installed, the help file can be view using the F1 function key.

See the IecStringHelp. This help is included in the binary download of this library.

Dependencies

Authors

Related Projects