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,166
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

uglyboi1
Replies
17
Views
1K
Lordgoro
Lordgoro
Based Vampire
Replies
12
Views
412
Based Vampire
Based Vampire
Magonia
Replies
2
Views
314
Straizer
Straizer
Top