Skip to content

Commit 369c421

Browse files
author
as
committed
- some wip
1 parent 952b88e commit 369c421

File tree

3 files changed

+48
-2
lines changed

3 files changed

+48
-2
lines changed

bin/Falcon.swc

285 Bytes
Binary file not shown.

src/com/hendrix/feathers/controls/core/sql/sqlSerialData/SQLSerialDataTable.as

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,11 @@ package com.hendrix.feathers.controls.core.sql.sqlSerialData
100100
/**
101101
* Select data from a window of identifiers. useful when ids are timestamps.
102102
* requires QA.
103+
*
103104
* @param idFrom starting id
104105
* @param idTo last id
105106
* @param callback a callback
107+
*
106108
* @return Array result, or null and Array into callback
107109
*/
108110
public function getDataBetween(idFrom:String, idTo:String, callback:Function = null):Array
@@ -153,9 +155,8 @@ package com.hendrix.feathers.controls.core.sql.sqlSerialData
153155
* add new data, or update an older one with the correct conflict algorithm
154156
* @param id the id of the data
155157
* @param data the data
156-
* @param conflictAlgorithm for example <code>SQLiteDatabase.CONFLICT_REPLACE</code>
157158
*/
158-
public function addData(id: String, data:Object, conflictAlgorithm:int):void
159+
public function addData(id: String, data:Object):void
159160
{
160161
if(_connection.connected == false)
161162
return ;

src/com/hendrix/feathers/controls/utils/TextUtils.as

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,58 @@ package com.hendrix.feathers.controls.utils
22
{
33
public class TextUtils
44
{
5+
static public const TRIM_POLICY_LEFT: String = "TRIM_POLICY_LEFT";
6+
static public const TRIM_POLICY_RIGHT:String = "TRIM_POLICY_RIGHT";
7+
static public const TRIM_POLICY_BIDI: String = "TRIM_POLICY_BIDI";
8+
59
static public var currentDate:Date = new Date();
610
static private var _stringAux:String = new String("aux");
711

812
public function TextUtils()
913
{
1014
}
1115

16+
/**
17+
* trim a string with repeated character from any direction
18+
*
19+
* @param str the string to trim
20+
* @param char the character to trim
21+
* @param policy the trimming policy {}
22+
*
23+
* @return the trimmed string
24+
*
25+
*/
26+
public static function trim(str:String, char:String = " ", policy: String = TRIM_POLICY_BIDI): String {
27+
var index_start: uint = 0;
28+
var index_end: uint = str.length;
29+
30+
if(policy==TRIM_POLICY_BIDI || policy==TRIM_POLICY_LEFT) {
31+
for(index_start = 0;; index_start++) {
32+
if(str.charAt(index_start) != char)
33+
break;
34+
}
35+
}
36+
37+
if(policy==TRIM_POLICY_BIDI || policy==TRIM_POLICY_RIGHT) {
38+
39+
for(index_end = str.length;; index_end--) {
40+
var st: String = str.charAt(index_end);
41+
42+
if(st == '') continue;
43+
44+
if(st!=char) {
45+
index_end += 1;
46+
break;
47+
}
48+
49+
}
50+
51+
}
52+
53+
return str.substring(index_start, index_end);
54+
}
55+
56+
1257
/**
1358
* detects hebrew and if so reverses the text. use it only for one line.
1459
*/

0 commit comments

Comments
 (0)