<commit_before>'use strict';

var isString = require('../../utils/string').isString;
var format = require('../../utils/string').format;

function factory (type, config, load, typed) {
  /**
   * Interpolate values into a string template.
   *
   * Syntax:
   *
   *     math.print(template, values)
   *     math.print(template, values, precision)
   *     math.print(template, values, options)
   *
   * Example usage:
   *
   *     // the following outputs: 'Lucy is 5 years old'
   *     math.print('Lucy is $age years old', {age: 5});
   *
   *     // the following outputs: 'The value of pi is 3.141592654'
   *     math.print('The value of pi is $pi', {pi: math.pi}, 10);
   *
   *     // the following outputs: 'hello Mary! The date is 2013-03-23'
   *     math.print('Hello $user.name! The date is $date', {
   *       user: {
   *         name: 'Mary',
   *       },
   *       date: new Date(2013, 2, 23).toISOString().substring(0, 10)
   *     });
   *
   *    // the following outputs: 'My favorite fruits are apples and bananas !'
   *    math.print('My favorite fruits are $0 and $1 !', [
   *      'apples',
   *      'bananas'
   *    ]);
   *
   * See also:
   *
   *     format
   *
   * @param {string} template       A string containing variable placeholders.
   * @param {Object | Array | Matrix} values An object or array containing variables
   *                                which will be filled in in the template.
   * @param {number | Object} [options]  Formatting options,
   *                                or the number of digits to format numbers.
   *                                See function math.format for a description
   *                                of all options.
   * @return {string} Interpolated string
   */
  var print = typed ('print', {
    // note: Matrix will be converted automatically to an Array
    'string, Object | Array': _print,
    'string, Object | Array, number | Object': _print
  });

  print.toTex = undefined; // use default template

  return print;
}

/**
 * Interpolate values into a string template.
 * @param {string} template<commit_msg>Fixed indentation<commit_after>'use strict';

var isString = require('../../utils/string').isString;
var format = require('../../utils/string').format;

function factory (type, config, load, typed) {
  /**
   * Interpolate values into a string template.
   *
   * Syntax:
   *
   *     math.print(template, values)
   *     math.print(template, values, precision)
   *     math.print(template, values, options)
   *
   * Example usage:
   *
   *     // the following outputs: 'Lucy is 5 years old'
   *     math.print('Lucy is $age years old', {age: 5});
   *
   *     // the following outputs: 'The value of pi is 3.141592654'
   *     math.print('The value of pi is $pi', {pi: math.pi}, 10);
   *
   *     // the following outputs: 'hello Mary! The date is 2013-03-23'
   *     math.print('Hello $user.name! The date is $date', {
   *       user: {
   *         name: 'Mary',
   *       },
   *       date: new Date(2013, 2, 23).toISOString().substring(0, 10)
   *     });
   *
   *     // the following outputs: 'My favorite fruits are apples and bananas !'
   *     math.print('My favorite fruits are $0 and $1 !', [
   *       'apples',
   *       'bananas'
   *     ]);
   *
   * See also:
   *
   *     format
   *
   * @param {string} template       A string containing variable placeholders.
   * @param {Object | Array | Matrix} values An object or array containing variables
   *                                which will be filled in in the template.
   * @param {number | Object} [options]  Formatting options,
   *                                or the number of digits to format numbers.
   *                                See function math.format for a description
   *                                of all options.
   * @return {string} Interpolated string
   */
  var print = typed ('print', {
    // note: Matrix will be converted automatically to an Array
    'string, Object | Array': _print,
    'string, Object | Array, number | Object': _print
  });

  print.toTex = undefined; // use default template

  return print;
}

/**
 * Interpolate values into a string template.
 * @param {string} template
{'fraction_non_alphanumeric': 0.1263852864890356, 'fraction_numerical': 0.01603395425607168, 'mean_word_length': 1.9810260014054815, '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': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5368039', 'n_tokens_mistral': 1305, 'n_tokens_neox': 1242, 'n_words': 406}