To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / .svn / pristine / 65 / 654a3e4d61187374fd83543621c54137d6380420.svn-base @ 1297:0a574315af3e
History | View | Annotate | Download (374 Bytes)
| 1 | 1296:038ba2d95de8 | Chris | require File.dirname(__FILE__) + '/string/conversions' |
|---|---|---|---|
| 2 | require File.dirname(__FILE__) + '/string/inflections' |
||
| 3 | |||
| 4 | class String #:nodoc: |
||
| 5 | include Redmine::CoreExtensions::String::Conversions |
||
| 6 | include Redmine::CoreExtensions::String::Inflections |
||
| 7 | |||
| 8 | def is_binary_data? |
||
| 9 | ( self.count( "^ -~", "^\r\n" ).fdiv(self.size) > 0.3 || self.index( "\x00" ) ) unless empty? |
||
| 10 | end |
||
| 11 | end |