/*呈示値の文字部分だけを抜き出した配列を返す*/\r
strList: function() {\r
/*replaceメソッドで1E-10などの対策*/\r
- return this.string.replace(/\d[eE][\-\+\d]/g, "")\r
+ var list = this.string.replace(/\d[eE][\-\+\d]/g, "")\r
.match(/[^\d\-\+\.]+/g);\r
+ return list && list.map( function(x) {\r
+ return x.trim();\r
+ } );\r
},\r
\r
from: base("$from").up().mix( {\r
expect(from.numList()).toEqual([]);\r
expect(from.strList()[0]).toBe("a");\r
\r
+ /*前後の空白を除去する処理をしない。なぜなら、文字列リストの空白は保持するのが望ましいから\r
+ * 文字列リストの空白を除去した例: "M 20 20 M M" -> "M20 20 MM"となってしまう*/\r
+ \r
from.string = null;\r
expect( function() {\r
from.numList();\r