Returns a readable representation of this number.

 This representation is valid CSS (and valid SassScript)
 as long as there is only one unit.

 @return [String] The representation
544616
def inspect(opts = {})
      return original if original

      value = self.class.round(self.value)
      str = value.to_s

      # Ruby will occasionally print in scientific notation if the number is
      # small enough. That's technically valid CSS, but it's not well-supported
      # and confusing.
      str = ("%0.#{self.class.precision}f" % value).gsub(/0*$/, '') if str.include?('e')

      # Sometimes numeric formatting will result in a decimal number with a trailing zero (x.0)
      if str =~ /(.*)\.0$/
        str = $1
      end

      # We omit a leading zero before the decimal point in compressed mode.
      if @options && options[:style] == :compressed
        str.sub!(/^(-)?0\./, '\1.')
      end

      unitless? ? str : "#{str}#{unit_str}"
    end
140719
def to_s
      ptr = CF.CFDataGetBytePtr(self)
      if CF::String::HAS_ENCODING
        ptr.read_string(CF.CFDataGetLength(self)).force_encoding(Encoding::ASCII_8BIT)
      else
        ptr.read_string(CF.CFDataGetLength(self))
      end
    end
1342399
function getStyleSize( value ) {
  var num = parseFloat( value );
  // not a percent like '100%', and a number
  var isValid = value.indexOf('%') === -1 && !isNaN( num );
  return isValid && num;
}
445918
def to_s
      #check whether any `high` bits are set
      ret           = (65..128).find {|bit| !!self[bit]}
      high, @bmp[0] = ret ? [128, true] : [64, false]

      str = ""
      1.upto(high) do|i|
        str << (self[i] ? '1' : '0')
      end

      str
    end
801767
def eq(other)
      return Bool::FALSE unless other.is_a?(Sass::Script::Value::Number)
      this = self
      begin
        if unitless?
          this = this.coerce(other.numerator_units, other.denominator_units)
        else
          other = other.coerce(@numerator_units, @denominator_units)
        end
      rescue Sass::UnitConversionError
        return Bool::FALSE
      end
      Bool.new(basically_equal?(this.value, other.value))
    end
20583
def css(self) -> str:
        
        selector = self.random.choice(CSS_SELECTORS)
        css_sel = '{}{}'.format(selector, self.__text.word())

        cont_tag = self.random.choice(list(HTML_CONTAINER_TAGS.keys()))
        mrk_tag = self.random.choice(HTML_MARKUP_TAGS)

        base = '{}'.format(self.random.choice([cont_tag, mrk_tag, css_sel]))
        props = '; '.join(
            [self.css_property() for _ in range(self.random.randint(1, 6))])
        return '{} {{{}}}'.format(base, props)
363466
def to_s
      return "" if @seconds.nil?

      hours, seconds = @seconds.divmod(Hour.to_seconds(1))
      minutes = seconds / Minute.to_seconds(1)
      sprintf("%d:%02d", hours, minutes)
    end
859503
def to_s(format = '')
      return '' if self.empty?

      case format
      when Symbol
        format = @@formats[format]
      when ''
        format += "(%a) " unless @area_code.nil? or @area_code.empty?
        format += "%p-" unless @prefix.nil? or @prefix.empty?
        format += "%n" unless @number.nil? or @number.empty?
        format += " x%e" unless @extension.nil? or @extension.empty?
      end

      format_number(format)
    end
1132074
function toNumber(value) {
        var _this = this;

        if (validateHelpers.isArray(value)) {
            return value.map(function (a) {
                return _this.toNumber(a);
            });
        }

        var number = parseFloat(value);

        if (number === undefined) {
            return value;
        }

        if (number.toString().length !== value.toString().length && !validateHelpers.isNumeric(value)) {
            return value;
        }

        return validateHelpers.isNumber(number) ? value : number;
    }
981542
def css_property(self) -> str:
        
        prop = self.random.choice(list(CSS_PROPERTIES.keys()))
        val = CSS_PROPERTIES[prop]

        if isinstance(val, list):
            val = self.random.choice(val)
        elif val == 'color':
            val = self.__text.hex_color()
        elif val == 'size':
            val = '{}{}'.format(self.random.randint(1, 99),
                                self.random.choice(CSS_SIZE_UNITS))

        return '{}: {}'.format(prop, val)
617583
def str_numerator(self):
        """"""
        if not self.undefined:
            return None
        unit_numerator, unit = self._unit_class(self.numerator).auto
        formatter = '%d' if unit_numerator == self.numerator else '%0.2f'
        numerator = locale.format(formatter, unit_numerator, grouping=True)
        return '{0} {1}'.format(numerator, unit)
1256842
def pretty_size(value):
    
    exp = int(math.log(value, 1024)) if value > 0 else 0
    unit = 'bkMGTPEZY'[exp]
    if exp == 0:
        return '%d%s' % (value, unit)       # value < 1024, result is always without fractions

    unit_value = value / (1024.0 ** exp)    # value in the relevant units
    places = int(math.log(unit_value, 10))  # number of digits before decimal point
    return '%.*f%s' % (2 - places, unit_value, unit)
505110
def to_s(base=2)
    n = Bits.power_of_two(base)
    if n
      digits = (size+n-1)/n
      #{ }"%0#{digits}d" % @v.to_s(base)
      Numerals::Format[:fix, base: base].set_leading_zeros(digits).write(@v)
    else
      @v.to_s(base)
    end
  end
167592
def to_s format=:symbol
      if format == :name
        unit_string = @value == 1 || @value == -1 ? @unit.name : @unit.pluralized_name 
      else
        unit_string = @unit.send format 
      end

      string =  "#{@value}"
      string += " #{unit_string}" unless unit_string.empty?

      string
    end
1320414
def to_md
      # Usually ruby is extremely readable, but I think "-1" means "give me all the 
      # trailing blank lines" is surprisingly opaque.  That's what the -1 does...
      lines = @text.split("\n", -1)
      lines.collect do |line|
        result = line
 
        # Leave lines that start with 4 spaces alone.  These are code blocks and
        # should pass through unchanged.
        unless result =~ /^\s{4,}/
 
          # Convert headers
          result.sub!(/^(=){1,6}/) { |s| "#" * s.length} unless result =~ /^={7,}/
 
          # Convert strong to have two stars
          # The matching pair of stars should start with a single star that is either at
          # the beginning of the line or not following a backslash, have at least one
          # non-star and non-backslash in between, then end in one star
          result.gsub!(/(\A|[^\\\*])\*([^\*]*[^\*\\])\*/, '\1**\2**')

          # Convert inline code spans to use backticks
          result.gsub!(/(\A|[^\\])\+([^\+]+)\+/, '\1`\2`')

          # Convert bare http:, mailto: and ftp: links
          result.gsub!(/(\A|\s)(http:|https:|mailto:|ftp:)(\S*)/, '\1[\2\3](\2\3)')

          # Convert bare www to an http: link
          result.gsub!(/(\A|\s)www\.(\S*)/, '\1[www.\2](http://www.\2)')

          # Convert link: links to refer to local files
          result.gsub!(/(\A|\s)link:(\S*)/, '\1[\2](\2)')

          # Convert multi word labels surrounded by {} with a url
          result.gsub!(/\{([^\}]*)\}\[(\S*)\]/, '[\1](\2)')

          # Convert one word labels with a url
          result.gsub!(/(\A|\s)([^\{\s]\S*)\[(\S*)\]/, '\1[\2](\3)')

        end
        
        result
      end.join("\n")
    end
672353
function () {
                var self = this;
                return '#' + padding2(Number(self.get('r')).toString(16)) + padding2(Number(self.get('g')).toString(16)) + padding2(Number(self.get('b')).toString(16));
            }
631592
def to_s(attributes=nil)
      content = printable_content(attributes)
      content_s = content.pp_s(:single_line) unless content.empty?
      "#{print_class_and_id}#{content_s}"
    end