<commit_before>( function _String_toStr2_test_s_( ) {

'use strict';

/*

 to run this test
 from the project directory run

 npm install
 node ./staging/abase/z.test/String.toStr2.test.s

 */

if( typeof module !== 'undefined' )
{

  require( '../wTools.s' );
  require( '../component/StringTools.s' );

  if( require( 'fs' ).existsSync( __dirname + '/../object/Testing.debug.s' ) )
    require( '../object/Testing.debug.s' );
  else
    require( 'wTesting' );

}

var _ = wTools;
var Self = {};

//
/*

\' 	single quote 	byte 0x27 in ASCII encoding
\" 	double quote 	byte 0x22 in ASCII encoding
\\ 	backslash 	byte 0x5c in ASCII encoding
\b 	backspace 	byte 0x08 in ASCII encoding
\f 	form feed - new page 	byte 0x0c in ASCII encoding
\n 	line feed - new line 	byte 0x0a in ASCII encoding
\r 	carriage return 	byte 0x0d in ASCII encoding
\t 	horizontal tab 	byte 0x09 in ASCII encoding
\v 	vertical tab 	byte 0x0b in ASCII encoding
\nnn 	arbitrary octal value 	byte nnn
\xnn 	arbitrary hexadecimal value 	byte nn
\unnnn 	universal character name
(arbitrary Unicode value);
may result in several characters 	code point U+nnnn
\Unnnnnnnn 	universal character name
(arbitrary Unicode value);
may result in several characters 	code point U+nnnnnnnn

source : http://en.cppreference.com/w/cpp/language/escape

*/
//

var reportChars = function()
{

  debugger;
  var r = '';
  for( var i = 0 ; i < 512 ; i++ )
  {
    var d = _.strDup( '0',4-i.toString( 16 ).length ) + i.toString( 16 );
    var u = eval( `"\\u${d}"` );
    r += `${d} : "${u}"\n`;
  }

  console.log( r );<commit_msg>extract char code table from toStr test file<commit_after>( function _String_toStr2_test_s_( ) {

'use strict';

/*

 to run this test
 from the project directory run

 npm install
 node ./staging/abase/z.test/String.toStr2.test.s

 */

if( typeof module !== 'undefined' )
{

  require( '../wTools.s' );
  require( '../component/StringTools.s' );

  if( require( 'fs' ).existsSync( __dirname + '/../object/Testing.debug.s' ) )
    require( '../object/Testing.debug.s' );
  else
    require( 'wTesting' );

}

var _ = wTools;
var Self = {};

//

var reportChars = function()
{

  debugger;
  var r = '';
  for( var i = 0 ; i < 512 ; i++ )
  {
    var d = _.strDup( '0',4-i.toString( 16 ).length ) + i.toString( 16 );
    var u = eval( `"\\u${d}"` );
    r += `${d} : "${u}"\n`;
  }

  console.log( r );
{'fraction_non_alphanumeric': 0.1535879143936215, 'fraction_numerical': 0.019303399076793955, 'mean_word_length': 2.86385737439222, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, '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': '964864', 'n_tokens_mistral': 941, 'n_tokens_neox': 868, 'n_words': 264}