Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
StringUtils.h File Reference

Utility functions for character strings. More...

#include "arccore/base/String.h"
#include <vector>
Include dependency graph for StringUtils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  Arcane
 -- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
namespace  Arccore
 Namespace of Arccore.

Functions

std::vector< UCharArcane::StringUtils::asUtf16BE (const String &str)
 Returns the conversion of the instance into UTF-16BE encoding.
std::wstring Arcane::StringUtils::convertToStdWString (const String &str)
 Returns the conversion of str to std::wstring.
String Arcane::StringUtils::convertToArcaneString (const std::wstring_view &wstr)
 Converts wstr into a String.
std::vector< UCharArccore::StringUtils::asUtf16BE (const String &str)
 Returns the conversion of the instance into UTF-16BE encoding.

Detailed Description

Utility functions for character strings.

Definition in file StringUtils.h.

Function Documentation

◆ asUtf16BE() [1/2]

std::vector< UChar > Arcane::StringUtils::asUtf16BE ( const String & str)

Returns the conversion of the instance into UTF-16BE encoding.

The returned vector does not contain a null terminator.

Definition at line 1289 of file String.cc.

◆ asUtf16BE() [2/2]

std::vector< UChar > Arcane::StringUtils::asUtf16BE ( const String & str)

Returns the conversion of the instance into UTF-16BE encoding.

The returned vector does not contain a null terminator.

Definition at line 36 of file String.cc.

◆ convertToArcaneString()

String Arcane::StringUtils::convertToArcaneString ( const std::wstring_view & wstr)

Converts wstr into a String.

This function is only supported for the Win32 platform.

Definition at line 1315 of file String.cc.

References ARCCORE_THROW, and Arcane::arccoreCheckArraySize().

◆ convertToStdWString()

std::wstring Arcane::StringUtils::convertToStdWString ( const String & str)

Returns the conversion of str to std::wstring.

This function is only supported for the Win32 platform.

Definition at line 1298 of file String.cc.

References ARCCORE_THROW, Arcane::ConstArrayView< T >::data(), and Arcane::ConstArrayView< T >::size().