Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Suche bestimmte Funktion

Empfohlene Antworten

Hallo alle miteinander,

das Problem ist vielleicht doch recht einfach, nur leider habe ich eine bestimmte Funktion in den weiten des Internets nicht gefunden.

Ausgangssituation in .JSP:

Variable A ist ein Text...

Variable B ist eine Art Stichwort.

Welche Funktion wäre am besten zu nutzen um zu sehen, dass B in A enthalten ist?

Mir fällt da gar nichts ein.

Hast du dir schonmal diese Seite angeschaut?

String (Java 2 Platform SE v1.4.2)

Da ist sicherlich etwas zu finden :)

Und nachdem Du in JSPs ganz sicher keine Scriptlets verwenden willst und Dir für das Problem auch kein eigenes Tag schreiben sollst, findest Du das passende Tag auch hier: TLDDoc Generated Documentation

Kleiner Tipp: Es ist eine Funktion

Peter

Bitte schreib in Zukunft die Datentypen mit dazu. Ich gehe mal davon aus, dass es sich um Strings handelt.

Die Klasse String stellt dir die Methode indexOf(String subString) zur Verfügung. Als Rückgabewert erhälst du die Position, an der sich der Substring befindet. Ist der String nicht enthalten gibt die Methode -1 zurück.

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.