Module: Windows::MSVCRT::String

Included in:
Unicode
Defined in:
lib/windows/msvcrt/string.rb

Constant Summary collapse

Strchr =
API.new('strchr', 'PI', 'P', MSVCRT_DLL)
Strcmp =
API.new('strcmp', 'PP', 'I', MSVCRT_DLL)
Strcpy =
API.new('strcpy', 'PL', 'L', MSVCRT_DLL)
Strcspn =
API.new('strcspn', 'PP', 'L', MSVCRT_DLL)
Strlen =
API.new('strlen', 'P', 'L', MSVCRT_DLL)
Strncpy =
API.new('strncpy', 'PPL', 'P', MSVCRT_DLL)
Strpbrk =
API.new('strpbrk',  'PP', 'P', MSVCRT_DLL)
Strrchr =
API.new('strrchr', 'PI', 'P', MSVCRT_DLL)
Strrev =
API.new('_strrev', 'P', 'P', MSVCRT_DLL)
Strspn =
API.new('strspn', 'PP', 'L', MSVCRT_DLL)
Strstr =
API.new('strstr', 'PP', 'P', MSVCRT_DLL)
Strtok =
API.new('strtok', 'PP', 'P', MSVCRT_DLL)
Mbscmp =
API.new('_mbscmp', 'PP', 'I', 'msvcrt')
Mbscpy =
API.new('_mbscpy', 'PL', 'L', 'msvcrt')
Mbslen =
API.new('_mbslen', 'P', 'L', 'msvcrt')
Mbsrev =
API.new('_mbsrev', 'P', 'P', 'msvcrt')
Wcscmp =
API.new('wcscmp', 'PP', 'I', MSVCRT_DLL)
Wcscpy =
API.new('wcscpy', 'PL', 'L', MSVCRT_DLL)
Wcslen =
API.new('wcslen', 'P', 'L', MSVCRT_DLL)
Wcsncpy =
API.new('wcsncpy', 'PPL', 'P', MSVCRT_DLL)
Wcsrev =
API.new('_wcsrev', 'P', 'P', MSVCRT_DLL)

Instance Method Summary collapse

Instance Method Details

#mbscmp(str1, str2) ⇒ Object



109
110
111
112
113
114
# File 'lib/windows/msvcrt/string.rb', line 109

def mbscmp(str1, str2)
  if str1 == 0 || str2 == 0
    return nil
  end
  Mbscmp.call(str1, str2)
end

#mbscpy(dest, src) ⇒ Object



116
117
118
119
# File 'lib/windows/msvcrt/string.rb', line 116

def mbscpy(dest, src)
  return nil if src == 0
  Mbscpy.call(dest, src)
end

#mbslen(string) ⇒ Object



121
122
123
124
# File 'lib/windows/msvcrt/string.rb', line 121

def mbslen(string)
  return nil if string == 0
  Mbslen.call(string)
end

#mbsrev(str) ⇒ Object



126
127
128
129
# File 'lib/windows/msvcrt/string.rb', line 126

def mbsrev(str)
  return nil if str == 0
  Mbsrev.call(str)
end

#strchr(string, char) ⇒ Object



40
41
42
43
# File 'lib/windows/msvcrt/string.rb', line 40

def strchr(string, char)
  return nil if string == 0 || char == 0
  Strchr.call(string, char)
end

#strcmp(str1, str2) ⇒ Object



45
46
47
48
49
50
# File 'lib/windows/msvcrt/string.rb', line 45

def strcmp(str1, str2)
  if str1 == 0 || str2 == 0
    return nil
  end
   Strcmp.call(str1, str2)
end

#strcpy(dest, src) ⇒ Object



52
53
54
55
# File 'lib/windows/msvcrt/string.rb', line 52

def strcpy(dest, src)
  return nil if src == 0
  Strcpy.call(dest, src)
end

#strcspn(string, charset) ⇒ Object



62
63
64
65
# File 'lib/windows/msvcrt/string.rb', line 62

def strcspn(string, charset)
  return nil if string == 0
  Strcspn.call(string, charset)
end

#strlen(string) ⇒ Object



57
58
59
60
# File 'lib/windows/msvcrt/string.rb', line 57

def strlen(string)
  return nil if string == 0
  Strlen.call(string)
end

#strncpy(dest, source, count) ⇒ Object



67
68
69
70
# File 'lib/windows/msvcrt/string.rb', line 67

def strncpy(dest, source, count)
  return nil if source == 0
  Strncpy.call(dest, source, count)
end

#strpbrk(string, charset) ⇒ Object



72
73
74
75
# File 'lib/windows/msvcrt/string.rb', line 72

def strpbrk(string, charset)
  return nil if string == 0 || charset == 0
  Strpbrk.call(string, charset)
end

#strrchr(string, int) ⇒ Object



77
78
79
80
# File 'lib/windows/msvcrt/string.rb', line 77

def strrchr(string, int)
  return nil if string == 0
  Strrchr.call(string, int)
end

#strrev(str) ⇒ Object



82
83
84
85
# File 'lib/windows/msvcrt/string.rb', line 82

def strrev(str)
  return nil if str == 0
  Strrev.call(str)
end

#strspn(string, charset) ⇒ Object



87
88
89
90
# File 'lib/windows/msvcrt/string.rb', line 87

def strspn(string, charset)
  return nil if string == 0 || charset == 0
  Strspn.call(string, charset)
end

#strstr(string, search) ⇒ Object



92
93
94
95
# File 'lib/windows/msvcrt/string.rb', line 92

def strstr(string, search)
  return nil if string == 0 || search == 0
  Strstr.call(string, search)
end

#strtok(token, delimeter) ⇒ Object



97
98
99
100
# File 'lib/windows/msvcrt/string.rb', line 97

def strtok(token, delimeter)
  return nil if token == 0 || delimeter == 0
  Strtok.call(token, delimeter)
end

#strtok_s(token, delimeter, context) ⇒ Object



103
104
105
106
# File 'lib/windows/msvcrt/string.rb', line 103

def strtok_s(token, delimeter, context)
  return nil if [token, delimter, context].include?(0)
  Strtok_s.call(token, delimeter, context)
end

#wcscmp(str1, str2) ⇒ Object



131
132
133
134
135
136
# File 'lib/windows/msvcrt/string.rb', line 131

def wcscmp(str1, str2)
  if str1 == 0 || str2 == 0
    return nil
  end
  Wcscmp.call(str1, str2)
end

#wcscpy(dest, src) ⇒ Object



138
139
140
141
# File 'lib/windows/msvcrt/string.rb', line 138

def wcscpy(dest, src)
  return nil if src == 0
  Wcscpy.call(dest, src)
end

#wcslen(string) ⇒ Object



143
144
145
146
# File 'lib/windows/msvcrt/string.rb', line 143

def wcslen(string)
  return nil if string == 0
  Wcslen.call(string)
end

#wcsncpy(dest, source, count) ⇒ Object



148
149
150
151
# File 'lib/windows/msvcrt/string.rb', line 148

def wcsncpy(dest, source, count)
  return nil if source == 0
  Wcsncpy.call(dest, source, count)
end

#wcsrev(str) ⇒ Object



153
154
155
156
# File 'lib/windows/msvcrt/string.rb', line 153

def wcsrev(str)
  return nil if str == 0
  Wcsrev.call(str)
end