bytetool 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/bytetool.rb +45 -0
  2. metadata +3 -3
@@ -8,4 +8,49 @@ class Bytetool
8
8
  res = result.to_a
9
9
  return(res[1])
10
10
  end
11
+ def self.sqlorgstrng(a)
12
+
13
+ a = a[0]
14
+ a = a[0]
15
+ return(a)
16
+ end
17
+
18
+ def self.imgfilename(y)
19
+
20
+ d = y.count "/"
21
+ i = 0
22
+
23
+ while d > i do
24
+ result = y.match("/(.*)")
25
+ res = result.to_a
26
+ y = res[1]
27
+ i +=1
28
+ end
29
+ return(y)
30
+ end
31
+
32
+
33
+ def self.isstrint(i)
34
+ if((i.nil?) or ((i.is_a?(String)) and (i !~ /^\s*[+-]?((\d+_?)*\d+(\.(\d+_?)*\d+)?|\.(\d+_?)*\d+)(\s*|([eE][+-]?(\d+_?)*\d+)\s*)$/)))
35
+ return(1)
36
+ else
37
+ return(0)
38
+ end
39
+ end
40
+
41
+ def self.isdategtrnow(str)
42
+
43
+ begin
44
+ Date.parse(str)
45
+ if ( Date.parse(str) > Date.today)
46
+ return(0)
47
+ else
48
+ return(1)
49
+ end
50
+
51
+ rescue
52
+ return(0)
53
+ end
54
+ end
55
+
11
56
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bytetool
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Shintomon Mathew