//**************************************************************************************************
//
// ZERO TERMINATED STRING OPERATIONS (SEE ALSO "$Str" STATIC CLASS):
//
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// RuntimeForStatic base library | C+- (SysRoutine) | Author: Sergei Y.Kitáev
#pragma once
#include "include_restrictions.h"
namespace RuntimeForStatic {

//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
//
// "$SZ" STATIC CLASS:
//
//==================================================================================================
class $SZ
{
$STATIC_CLASS( $SZ )
public:
   static int Length($A,PCWSTR source) $fatal_error_on_failure;
   static bool IsEmpty($A,PCWSTR source);
   static PWSTR Copy($A,PCWSTR source,PWSTR destination,int destCapacity) $ret_target
                                                                          $fatal_error_on_failure;
   static bool TruncCopy($A,PCWSTR source,PWSTR destination,int destCapacity) $ret_target;
public:
   static PWSTR Duplicate($AM,PCWSTR source) $fatal_error_on_failure $needs_free;
   static PWSTR DuplicateNS($AM,PCWSTR source) $null_on_failure $last_error $needs_free;

   static PWSTR Duplicate($A,$M, PCWSTR source ) $fatal_error_on_failure $needs_free;
   static PWSTR DuplicateNS($A,$M, PCWSTR source ) $null_on_failure $last_error $needs_free;
public:
   static PWSTR FormatAlloc($AM, PCWSTR messageFmt, ... ) $fatal_error_on_failure $needs_free;
   static PWSTR FormatAllocVA($AM, PCWSTR messageFmt, va_list argList ) $fatal_error_on_failure
                                                                        $needs_free;
   static PWSTR FormatAllocNS($AM, PCWSTR messageFmt, ... ) $null_on_failure
                                                            $last_error
                                                            $needs_free;
   static PWSTR FormatAllocVANS($AM, PCWSTR messageFmt, va_list argList ) $null_on_failure
                                                                          $last_error
                                                                          $needs_free;

   static PWSTR FormatAlloc($A,$M, PCWSTR messageFmt, ... ) $fatal_error_on_failure $needs_free;
   static PWSTR FormatAllocVA($A,$M, PCWSTR messageFmt, va_list argList ) $fatal_error_on_failure
                                                                          $needs_free;
   static PWSTR FormatAllocNS($A,$M, PCWSTR messageFmt, ... ) $null_on_failure
                                                              $last_error
                                                              $needs_free;
   static PWSTR FormatAllocVANS($A,$M, PCWSTR messageFmt, va_list argList ) $null_on_failure
                                                                            $last_error
                                                                            $needs_free;
public:
   static int VerifyLength($A,SIZE_T length) $fatal_error_on_failure;
   static void Fail_SourceStringTooLong($A);
   static PCWSTR SourceStringTooLong_MessgeFmt();
}; // $SZ
//==================================================================================================

} // RuntimeForStatic
