Groovy Beginner Tutorial 14 | Strings

  Рет қаралды 23,365

Automation Step by Step

Automation Step by Step

Күн бұрын

Пікірлер: 27
@gauravtiwari9263
@gauravtiwari9263 3 жыл бұрын
I really liked you hand on approach, keep up the good work
@RaghavPal
@RaghavPal 3 жыл бұрын
I appreciate that Gaurav
@timblaktu
@timblaktu 3 жыл бұрын
Excellent tutorial, nice fast pace easy to skim..
@RaghavPal
@RaghavPal 3 жыл бұрын
Glad you liked it Tim
@thupakularamesh6957
@thupakularamesh6957 2 жыл бұрын
WOWWWWWWWWWWWWWWWW.....I learned a lot in this 20 minutes
@RaghavPal
@RaghavPal 2 жыл бұрын
Happy to hear that
@girishfury2630
@girishfury2630 2 жыл бұрын
Thank u Raghav
@RaghavPal
@RaghavPal 2 жыл бұрын
Most welcome Girish
@Dunuka
@Dunuka 3 ай бұрын
hi Raghav.. in video at 10:58 you said it will print from 1 to 4 index digits/chars but i can see the output is coming b/w 1 to 4. mean 3 digits (if its 1 to 4 then it will have 4 digits)
@RaghavPal
@RaghavPal 3 ай бұрын
Hi In Groovy, the .subSequence(int start, int end) function is used to extract a portion of a string, starting from the start index (inclusive) and ending at the end index (exclusive) str.subSequence(1, 4) extracts the substring starting at index 1 and ending at index 4 (not including the character at index 4) Sorry if it was a mistake in the video
@Dunuka
@Dunuka 3 ай бұрын
@@RaghavPal No Problem, Really Helpful...Thanks a lot for your explanation Bro.👍
@MaheshJoshi_wellington
@MaheshJoshi_wellington 5 жыл бұрын
This is amazing ! Will help me in katalon ! Raghav how I can get the 10% from following line using groovy string here is string "Cancel >14 days before Start Date 10% Unit Price: $16.00 , Qty: 1 , Total: $16.00" In above things are - 10% will always have 1 space before 10 and 1st sentance will always end with percentage I mean 10% or 20 or 30 etc..
@RaghavPal
@RaghavPal 5 жыл бұрын
Hi Mahesh, you can use regular expression to get the text out of the string. Groovy uses symbol =~ to check match with the help of regular expression. Like in your case you can use regular expression /(?:10\%)/ and then write a groovy code as follows: String regex = /(?:10\%)/ def match = str1 =~ regex if (match) { println "Success" println match[0] }
@MaheshJoshi_wellington
@MaheshJoshi_wellington 5 жыл бұрын
@@RaghavPal I am new to programming I will practice thanks a lot downloading eclipse now will go through your series.wht is best Intelleg IDE OR eclips ?
@RaghavPal
@RaghavPal 5 жыл бұрын
Glad to know Mahesh, Eclipse or INtelliJ, both are good, I cannot do a un-biased suggestion as I have been using Eclipse since the beginning, However, if you choose to go with IntelliJ, that should also be fine.
@HeyMani92
@HeyMani92 5 жыл бұрын
Thank you so much Rhagav
@RaghavPal
@RaghavPal 5 жыл бұрын
You're welcome Mani
@brianmadu1059
@brianmadu1059 4 жыл бұрын
When it comes to concatenation when would you want to use "+" over the ".concat" method?
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Brian, interesting question, This will help you to get details This will hold true for both java and groovy www.geeksforgeeks.org/difference-between-concat-and-operator-in-java/ stackoverflow.com/questions/693597/is-there-a-difference-between-string-concat-and-the-operator-in-java
@TheGuroguro12
@TheGuroguro12 2 жыл бұрын
Thank u
@RaghavPal
@RaghavPal 2 жыл бұрын
Welcome
@kshipra4504
@kshipra4504 2 жыл бұрын
Can we write like str1==str2 for string comparison in groovy? or will it compare their locations and not actual content?
@RaghavPal
@RaghavPal 2 жыл бұрын
Hi Kshipra, can use this
@dv10091989
@dv10091989 4 жыл бұрын
Hello Raghav, Amazing series. Can you please help me with GITHUB link for this Groovy Series? Also can you please do a series on Jenkins Pipeline and Groovy integration?
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Dhrumil, you will get all tutorials here - automationstepbystep.com/
@TheSwatisadhukhan
@TheSwatisadhukhan 5 жыл бұрын
what is the difference between slashy and dollar slashy? When both are giving the same output.
@RaghavPal
@RaghavPal 5 жыл бұрын
Hi Swati, if you're defining a regular expression pattern, then slashy strings are useful as you don't need to escape backslashes, ie /\s+/ However, if you need a forward slash in your pattern, you'd need a dollar slashy string $/([a-z]+)/([a-z]+)/$ stackoverflow.com/questions/31911446/whats-the-purpose-of-dollar-slashy-string-in-groovy
Groovy Beginner Tutorial 15 | Methods
10:11
Automation Step by Step
Рет қаралды 24 М.
Groovy Beginner Tutorial 12 | Loops in Groovy
13:43
Automation Step by Step
Рет қаралды 30 М.
Players vs Pitch 🤯
00:26
LE FOOT EN VIDÉO
Рет қаралды 122 МЛН
ТЮРЕМЩИК В БОКСЕ! #shorts
00:58
HARD_MMA
Рет қаралды 1,3 МЛН
10 Things You Can Do With Groovy Closures!
26:08
Szymon Stepniak
Рет қаралды 19 М.
Groovy Beginner Tutorial 18 | Maps
13:58
Automation Step by Step
Рет қаралды 19 М.
Groovy Beginner Tutorial 21 |  How to read files in groovy
22:48
Automation Step by Step
Рет қаралды 28 М.
Groovy Beginner Tutorial 9 | Data Types
13:10
Automation Step by Step
Рет қаралды 40 М.
ASMR Programming - Spinning Cube - No Talking
20:45
Servet Gulnaroglu
Рет қаралды 4,1 МЛН
Groovy Beginner Tutorial 17 | Lists
17:55
Automation Step by Step
Рет қаралды 20 М.
Java Asynchronous Programming
16:07
Defog Tech
Рет қаралды 148 М.
Webinar: An introduction to Groovy scripting - write your very first script
55:10
School Of Basics | What is an API | API testing interview questions
7:58
Automation Step by Step
Рет қаралды 434 М.