FeatStd 3.12
String functions without bounds deprecated
All FeatStd::Internal::String related functions without bounds have been deprecated. Candera::StringPlatform is an alias for FeatStd::Internal::String.
Affected functions are:
- FeatStd::Internal::String::CompareStrings, use function with same name and additional parameter n instead.
- FeatStd::Internal::String::Copy, use function with same name and additional parameter n instead.
- FeatStd::Internal::String::Length, use function FeatStd::Internal::String::NLength instead.
- FeatStd::Internal::AsciiEncoding::CodePointCount, use function with same name and additional parameter n instead.
- FeatStd::Internal::AsciiEncoding::CharCount, use function FeatStd::Internal::AsciiEncoding::NCharCount instead.
- FeatStd::Internal::AsciiEncoding::Compare, use function FeatStd::Internal::AsciiEncoding::NCompare instead.
- FeatStd::Internal::AsciiEncoding::Match, use function with same name and additional parameter codePointCount instead.
- FeatStd::Internal::Utf8Encoding::CodePointCount, use function with same name and additional parameter n instead.
- FeatStd::Internal::Utf8Encoding::CharCount, use function FeatStd::Internal::Utf8Encoding::NCharCount instead.
- FeatStd::Internal::Utf8Encoding::Compare, use function FeatStd::Internal::Utf8Encoding::NCompare instead.
- FeatStd::Internal::Utf8Encoding::Match, use function with same name and additional parameter codePointCount instead.
In case that the upper limit is unknown, the constant FeatStd::Internal::String::BoundedStringLength can be used. This constant has a configured value of 4096.
TChar and Ucs2Char deprecated
The types TChar and Ucs2Char have been deprecated. Use Char instead. CGI Studio since long time only supports UTF-8 text encoding. Thus it was decided to remove the outdated option to also support wide characters.
TextEncoding methods Ucs4 and NUcs4 deprecated
The methods TextEncoding::Ucs4 and TextEncoding::NUcs4 return an UTF-32 encoded codepoint. The term "UCS4" is outdated. Therefore these methods have been deprecated. Use TextEncoding::GetUtf32 instead.
Fixed Point Option removed
There was the option to use fixed point arithmetic instead of floating point. However, this option was not supported anymore since long time. Therefore this option was now removed. The flags FEATSTD_FIXED_POINT_ARITHMETIC and FEATSTD_FIXED_POINT_FRACTIONAL_BITS have been removed.
Extended Stream API in FeatStd
The interface of FeatStd::Internal::IO::Stream has been extended to allow for Seeking (random-access). Multiple stream implementations have been added (FeatStd::Internal::IO::FileStream, FeatStd::Internal::IO::MemoryStream, FeatStd::Internal::IO::ReadOnlyMemoryStream) and several adapters (FeatStd::Internal::IO::TextReader, FeatStd::Internal::IO::TextWriter).
Migration Guide
| Description | V3.11.0 | V3.12.0 |
| Unbound String function deprecated | Int32 CompareStrings(const Char* lhs, const Char* rhs) | Int32 CompareStrings(const Char* lhs, const Char* rhs, SizeType n) |
| Unbound String function deprecated | void Copy(Char *to, const Char *from) | void Copy(Char *to, const Char *from, SizeType n) |
| Unbound String function deprecated | SizeType Length(const Char *str) | SizeType NLength(const Char *str, SizeType size) |
| Unbound TextEncoding function deprecated | UInt32 CodePointCount(const Char* string) | UInt32 CodePointCount(const Char* string, SizeType n) |
| Unbound TextEncoding function deprecated | UInt32 CharCount(const Char* string) | UInt32 NCharCount(const Char *string, UInt32 size) |
| Unbound TextEncoding function deprecated | Int32 Compare(const Char* s1, const Char* s2) | Int32 NCompare(const Char* s1, const Char* s2, SizeType charCount) |
| Unbound TextEncoding function deprecated | bool Match(const Char* s1, const Char* s2) | bool Match(const Char* s1, const Char* s2, UInt32 codePointCount) |
| Type change | Data type TChar. | Use Char instead. |
| Type change | Data type Ucs2Char. | Use Char (UTF-8 encoded) or UInt16 as UTF-16 encoded codepoint or UInt32 as UTF-32 encoded codepoint instead. |
| TextEncoding change | TextEncoding::Ucs4 and TextEncoding::NUcs4 methods. | Use TextEncoding::GetUtf32 instead. |
| FixedSizeString change | FixedSizeString::TCharCapacity method. | Use FixedSizeString::CharCapacity instead. |