<commit_before>#ifndef _string_h
#define _string_h

#include "definitions.h"

namespace pen
{
    void string_to_ascii( const c16* src, c8* dest );
    void string_to_wide( const c8* src, c16* dest );

    u32	 string_compare( const c8* string_a, const c8* string_b );
    u32	 string_compare_wide( const c16* string_a, const c16* string_b );

    void string_format_va( c8* dest, u32 buffer_size, const c8* format, va_list& va );
    void string_format( c8* dest, u32 buffer_size, const c8* format, ... );
    void string_format_wide( c16* dest, u32 buffer_size, const c16* format, ... );

    void string_concatonate( c8* dest, const c8* src, u32 buffer_size );
    void string_concatonate_wide( c16* dest, const c16* src, u32 buffer_size );

    u32  string_length( const c8* string );
    u32  string_length_wide( const c16* string );

    void string_output_debug( const c8* format, ... );

    c8* sub_string( c8* src, u32 length );

    //functions
    c8* sub_string( const c8* src, u32 length )
    {<commit_msg>remove strndup make function inline<commit_after>#ifndef _string_h
#define _string_h

#include "definitions.h"

namespace pen
{
    void string_to_ascii( const c16* src, c8* dest );
    void string_to_wide( const c8* src, c16* dest );

    u32	 string_compare( const c8* string_a, const c8* string_b );
    u32	 string_compare_wide( const c16* string_a, const c16* string_b );

    void string_format_va( c8* dest, u32 buffer_size, const c8* format, va_list& va );
    void string_format( c8* dest, u32 buffer_size, const c8* format, ... );
    void string_format_wide( c16* dest, u32 buffer_size, const c16* format, ... );

    void string_concatonate( c8* dest, const c8* src, u32 buffer_size );
    void string_concatonate_wide( c16* dest, const c16* src, u32 buffer_size );

    u32  string_length( const c8* string );
    u32  string_length_wide( const c16* string );

    void string_output_debug( const c8* format, ... );

    c8* sub_string( c8* src, u32 length );

    //functions
    inline c8* sub_string( const c8* src, u32 length )
    {
{'fraction_non_alphanumeric': 0.10526315789473684, 'fraction_numerical': 0.05408015451472718, 'mean_word_length': 3.625, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '904249', 'n_tokens_mistral': 788, 'n_tokens_neox': 727, 'n_words': 233}