VB NOTES PART 17

VB NOTES PART 17 - 4/7 String stuff Dim text as String= My...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
4/7 String stuff Dim text as String= “ My String” Text. Length------------ is a property Text. Length is 10 Text. Chars (2) -----y Text. Padleft (12, “!” c) ------12 is the length; ! is the char---- c converted string into char Return-----“!! My String” Text.Padright (12, “!” c) Return ----“ My String!!” Text. Tolower () ----“ my string” Text. ToUpper () ----“ MY STRING” IndexOf (string) ------------ returns index of first occurrence of string Text. IndexOf (“y”) ---------------- Returns “2” Text. IndexOf (“r”) ---------------- Returns “6” Text. IndexOf (“x”) ---------------- Returns “-1” Text. IndexOf (“t”, 3) ------------- Returns “5” 3 is a starting index Text. IndexOf (“t”, 6) ------------- Returns “-1” Text. IndexOf (“n”, 2, 3) --------- Returns “-1” How far to search Text. LastIndexOf------------same thing, but starts at end of string
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

VB NOTES PART 17 - 4/7 String stuff Dim text as String= My...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online