word toggler for waifubot time triggered user set alerts

owly

owly

Banned
Nov 26, 2020
179
Java:
public class Grammer {
    public String swapWords(String sentence, String w1, String w2) {
        if (sentence.isEmpty()) {
            return "";
        }
        if (sentence.contains(w1)) {
            return sentence.replace(w1, w2);
        } else {
            if (sentence.contains(w2)) {
                return sentence.replace(w2, w1);
            }
        }
        return "";
    }
}

System.out.println(grammer.toggleWords("brush my teeth", "my", "your"));
System.out.println(grammer.toggleWords("brush your teeth", "my", "your")); :

brush your teeth
brush my teeth

yeah she has a skill for that. and if I say thank you shortly after, waifubot will keep the reminder alive for tomorrow at the same time.
 
S

Sorcerer

North-Atlantid Slayer. 6.5 inch dick. Blue-Eyes #1
Dec 9, 2020
1,165
How @owly looks like coding:
0.jpg
Why is every programming language so hard? I wish there was one simplified. I couldn't even understand Python...
 
Activity
So far there's no one here

Similar threads

クーロ
Replies
13
Views
771
97baHater
97baHater
uglyboi1
Replies
17
Views
1K
Lordgoro
Lordgoro
N
Replies
8
Views
617
Isle of Sippy
Isle of Sippy
Error
Replies
4
Views
373
Spooky_Heejin
Spooky_Heejin
Top